@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
@@ -0,0 +1,102 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ const require_index = require('../../Typography/types/index.cjs');
3
+ const require_Typography = require('../../Typography/Typography.cjs');
4
+ require('../../Typography/index.cjs');
5
+ const require_PromptCarousel_types_types = require('../../PromptCarousel/types/types.cjs');
6
+ const require_PromptCarousel = require('../../PromptCarousel/PromptCarousel.cjs');
7
+ require('../../PromptCarousel/index.cjs');
8
+ const require_SparkleAnimation = require('../../SparkleAnimation/SparkleAnimation.cjs');
9
+ require('../../SparkleAnimation/index.cjs');
10
+ const require_SalesAgentProductCardsCarousel = require('../../FloatingChat/components/SalesAgentProductCardsCarousel.cjs');
11
+ const require_useWelcomeOverlayProducts = require('../hooks/useWelcomeOverlayProducts.cjs');
12
+ let react_jsx_runtime = require("react/jsx-runtime");
13
+ let classnames = require("classnames");
14
+ classnames = require_rolldown_runtime.__toESM(classnames);
15
+ let framer_motion = require("framer-motion");
16
+
17
+ //#region src/components/FullPageSalesAgent/components/WelcomeOverlay.tsx
18
+ const WelcomeOverlay = ({ show, theme, title, promptSuggestions, productCarouselTitle, productIds, chatFooter, suggestionButtonType, sparkleColor, backgroundStyle = { backgroundColor: "white" }, onSuggestionClick }) => {
19
+ const { products, isLoading } = require_useWelcomeOverlayProducts.useWelcomeOverlayProducts(productIds);
20
+ const showProductCarousel = !isLoading && products.length > 0 && !!productCarouselTitle;
21
+ const welcomeOverlayClassNames = (0, classnames.default)([
22
+ "envive-tw-inset-0",
23
+ "envive-tw-absolute",
24
+ "envive-tw-z-20",
25
+ "envive-tw-flex",
26
+ "envive-tw-w-full",
27
+ "envive-tw-h-full",
28
+ "envive-tw-max-w-[768px]",
29
+ "envive-tw-flex-col"
30
+ ]);
31
+ const titleClassNames = (0, classnames.default)([
32
+ "envive-tw-flex",
33
+ "envive-tw-flex-row",
34
+ "envive-tw-gap-2",
35
+ "envive-tw-items-center"
36
+ ]);
37
+ const titleBoxClassNames = (0, classnames.default)([
38
+ "envive-tw-flex",
39
+ "envive-tw-py-4",
40
+ "envive-tw-px-[14px]",
41
+ "envive-tw-flex-col",
42
+ "envive-tw-gap-4",
43
+ "envive-tw-bg-background-light",
44
+ "envive-tw-border-border-light",
45
+ "envive-tw-border-solid",
46
+ "envive-tw-border",
47
+ "envive-tw-rounded-global-custom"
48
+ ]);
49
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.AnimatePresence, { children: show && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
50
+ className: welcomeOverlayClassNames,
51
+ style: backgroundStyle,
52
+ initial: { opacity: 1 },
53
+ exit: {
54
+ opacity: 0,
55
+ transition: {
56
+ duration: .5,
57
+ ease: "easeIn"
58
+ }
59
+ },
60
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
61
+ className: "envive-tw-flex envive-tw-flex-1 envive-tw-flex-col envive-tw-gap-6 envive-tw-overflow-y-auto envive-tw-overflow-x-hidden envive-tw-px-4 envive-tw-pb-4 envive-tw-pt-6 lg:envive-tw-gap-10",
62
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
63
+ className: titleBoxClassNames,
64
+ children: [
65
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
66
+ className: titleClassNames,
67
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
68
+ variant: require_index.TypographyVariant.T3_MD,
69
+ children: title
70
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SparkleAnimation.SparkleAnimation, {
71
+ color: sparkleColor,
72
+ animate: false
73
+ })]
74
+ }),
75
+ chatFooter,
76
+ promptSuggestions.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PromptCarousel.PromptCarousel, {
77
+ theme,
78
+ promptButtonTexts: promptSuggestions,
79
+ promptButtonType: suggestionButtonType,
80
+ promptCarouselRows: require_PromptCarousel_types_types.PromptCarouselRows.ALWAYS_TWO,
81
+ animationSpeed: require_PromptCarousel_types_types.AnimationSpeed.NONE,
82
+ handleButtonClick: onSuggestionClick
83
+ })
84
+ ]
85
+ }), showProductCarousel && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
86
+ className: "envive-tw-flex envive-tw-flex-col envive-tw-gap-3",
87
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
88
+ variant: require_index.TypographyVariant.B2_MD,
89
+ children: productCarouselTitle
90
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SalesAgentProductCardsCarousel.SalesAgentProductCardsCarousel, {
91
+ theme,
92
+ hideBadgeCount: true,
93
+ products,
94
+ hideNavigation: false
95
+ })]
96
+ })]
97
+ })
98
+ }, "welcome-overlay") });
99
+ };
100
+
101
+ //#endregion
102
+ exports.WelcomeOverlay = WelcomeOverlay;
@@ -0,0 +1,100 @@
1
+ import { TypographyVariant } from "../../Typography/types/index.js";
2
+ import { Typography } from "../../Typography/Typography.js";
3
+ import "../../Typography/index.js";
4
+ import { AnimationSpeed, PromptCarouselRows } from "../../PromptCarousel/types/types.js";
5
+ import { PromptCarousel } from "../../PromptCarousel/PromptCarousel.js";
6
+ import "../../PromptCarousel/index.js";
7
+ import { SparkleAnimation } from "../../SparkleAnimation/SparkleAnimation.js";
8
+ import "../../SparkleAnimation/index.js";
9
+ import { SalesAgentProductCardsCarousel } from "../../FloatingChat/components/SalesAgentProductCardsCarousel.js";
10
+ import { useWelcomeOverlayProducts } from "../hooks/useWelcomeOverlayProducts.js";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ import classNames from "classnames";
13
+ import { AnimatePresence, motion } from "framer-motion";
14
+
15
+ //#region src/components/FullPageSalesAgent/components/WelcomeOverlay.tsx
16
+ const WelcomeOverlay = ({ show, theme, title, promptSuggestions, productCarouselTitle, productIds, chatFooter, suggestionButtonType, sparkleColor, backgroundStyle = { backgroundColor: "white" }, onSuggestionClick }) => {
17
+ const { products, isLoading } = useWelcomeOverlayProducts(productIds);
18
+ const showProductCarousel = !isLoading && products.length > 0 && !!productCarouselTitle;
19
+ const welcomeOverlayClassNames = classNames([
20
+ "envive-tw-inset-0",
21
+ "envive-tw-absolute",
22
+ "envive-tw-z-20",
23
+ "envive-tw-flex",
24
+ "envive-tw-w-full",
25
+ "envive-tw-h-full",
26
+ "envive-tw-max-w-[768px]",
27
+ "envive-tw-flex-col"
28
+ ]);
29
+ const titleClassNames = classNames([
30
+ "envive-tw-flex",
31
+ "envive-tw-flex-row",
32
+ "envive-tw-gap-2",
33
+ "envive-tw-items-center"
34
+ ]);
35
+ const titleBoxClassNames = classNames([
36
+ "envive-tw-flex",
37
+ "envive-tw-py-4",
38
+ "envive-tw-px-[14px]",
39
+ "envive-tw-flex-col",
40
+ "envive-tw-gap-4",
41
+ "envive-tw-bg-background-light",
42
+ "envive-tw-border-border-light",
43
+ "envive-tw-border-solid",
44
+ "envive-tw-border",
45
+ "envive-tw-rounded-global-custom"
46
+ ]);
47
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: show && /* @__PURE__ */ jsx(motion.div, {
48
+ className: welcomeOverlayClassNames,
49
+ style: backgroundStyle,
50
+ initial: { opacity: 1 },
51
+ exit: {
52
+ opacity: 0,
53
+ transition: {
54
+ duration: .5,
55
+ ease: "easeIn"
56
+ }
57
+ },
58
+ children: /* @__PURE__ */ jsxs("div", {
59
+ className: "envive-tw-flex envive-tw-flex-1 envive-tw-flex-col envive-tw-gap-6 envive-tw-overflow-y-auto envive-tw-overflow-x-hidden envive-tw-px-4 envive-tw-pb-4 envive-tw-pt-6 lg:envive-tw-gap-10",
60
+ children: [/* @__PURE__ */ jsxs("div", {
61
+ className: titleBoxClassNames,
62
+ children: [
63
+ /* @__PURE__ */ jsxs("div", {
64
+ className: titleClassNames,
65
+ children: [/* @__PURE__ */ jsx(Typography, {
66
+ variant: TypographyVariant.T3_MD,
67
+ children: title
68
+ }), /* @__PURE__ */ jsx(SparkleAnimation, {
69
+ color: sparkleColor,
70
+ animate: false
71
+ })]
72
+ }),
73
+ chatFooter,
74
+ promptSuggestions.length > 0 && /* @__PURE__ */ jsx(PromptCarousel, {
75
+ theme,
76
+ promptButtonTexts: promptSuggestions,
77
+ promptButtonType: suggestionButtonType,
78
+ promptCarouselRows: PromptCarouselRows.ALWAYS_TWO,
79
+ animationSpeed: AnimationSpeed.NONE,
80
+ handleButtonClick: onSuggestionClick
81
+ })
82
+ ]
83
+ }), showProductCarousel && /* @__PURE__ */ jsxs("div", {
84
+ className: "envive-tw-flex envive-tw-flex-col envive-tw-gap-3",
85
+ children: [/* @__PURE__ */ jsx(Typography, {
86
+ variant: TypographyVariant.B2_MD,
87
+ children: productCarouselTitle
88
+ }), /* @__PURE__ */ jsx(SalesAgentProductCardsCarousel, {
89
+ theme,
90
+ hideBadgeCount: true,
91
+ products,
92
+ hideNavigation: false
93
+ })]
94
+ })]
95
+ })
96
+ }, "welcome-overlay") });
97
+ };
98
+
99
+ //#endregion
100
+ export { WelcomeOverlay };
@@ -1,4 +1,5 @@
1
1
  const require_Layout = require('./Layout.cjs');
2
+ const require_WelcomeOverlay = require('./WelcomeOverlay.cjs');
2
3
 
3
4
  //#region src/components/FullPageSalesAgent/components/index.ts
4
5
  const FullPageSAComponents = { Layout: require_Layout.Layout };
@@ -1,4 +1,5 @@
1
1
  import { Layout } from "./Layout.js";
2
+ import { WelcomeOverlay } from "./WelcomeOverlay.js";
2
3
 
3
4
  //#region src/components/FullPageSalesAgent/components/index.ts
4
5
  const FullPageSAComponents = { Layout };
@@ -1,15 +1,25 @@
1
1
  const require_useIsMobile = require('./useIsMobile.cjs');
2
2
 
3
3
  //#region src/components/FullPageSalesAgent/hooks/useGetFooterStyles.ts
4
- const useGetFooterStyles = () => {
4
+ const getStyles = ({ isMobile, showOverlay }) => {
5
+ if (showOverlay) return {
6
+ padding: 0,
7
+ borderTopWidth: "0px"
8
+ };
9
+ return isMobile ? void 0 : {
10
+ boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
11
+ borderWidth: "1px"
12
+ };
13
+ };
14
+ const useGetFooterStyles = ({ showOverlay }) => {
5
15
  const { isMobile } = require_useIsMobile.useIsMobile();
6
16
  return {
7
- footerStyles: !isMobile ? {
8
- boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
9
- borderWidth: "1px"
10
- } : null,
17
+ footerStyles: getStyles({
18
+ isMobile,
19
+ showOverlay
20
+ }),
11
21
  footerClasses: isMobile ? "envive-tw-rounded-t-[var(--envive-global-custom-border-radius)]" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)]",
12
- footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-left-[calc((100vw-768px)/2)] envive-tw-right-[calc((100vw-768px)/2)] envive-tw-max-w-[768px]"
22
+ footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-w-full envive-tw-left-0 envive-tw-right-0"
13
23
  };
14
24
  };
15
25
 
@@ -1,15 +1,25 @@
1
1
  import { useIsMobile } from "./useIsMobile.js";
2
2
 
3
3
  //#region src/components/FullPageSalesAgent/hooks/useGetFooterStyles.ts
4
- const useGetFooterStyles = () => {
4
+ const getStyles = ({ isMobile, showOverlay }) => {
5
+ if (showOverlay) return {
6
+ padding: 0,
7
+ borderTopWidth: "0px"
8
+ };
9
+ return isMobile ? void 0 : {
10
+ boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
11
+ borderWidth: "1px"
12
+ };
13
+ };
14
+ const useGetFooterStyles = ({ showOverlay }) => {
5
15
  const { isMobile } = useIsMobile();
6
16
  return {
7
- footerStyles: !isMobile ? {
8
- boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
9
- borderWidth: "1px"
10
- } : null,
17
+ footerStyles: getStyles({
18
+ isMobile,
19
+ showOverlay
20
+ }),
11
21
  footerClasses: isMobile ? "envive-tw-rounded-t-[var(--envive-global-custom-border-radius)]" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)]",
12
- footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-left-[calc((100vw-768px)/2)] envive-tw-right-[calc((100vw-768px)/2)] envive-tw-max-w-[768px]"
22
+ footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-w-full envive-tw-left-0 envive-tw-right-0"
13
23
  };
14
24
  };
15
25
 
@@ -0,0 +1,43 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ let react = require("react");
3
+ let __envive_ai_react_hooks_application_commerce_api = require("@envive-ai/react-hooks/application/commerce-api");
4
+ __envive_ai_react_hooks_application_commerce_api = require_rolldown_runtime.__toESM(__envive_ai_react_hooks_application_commerce_api);
5
+
6
+ //#region src/components/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.ts
7
+ const mapToCardProps = (p) => ({
8
+ productName: p.title ?? "",
9
+ currentPrice: p.salePrice ?? 0,
10
+ previousPrice: p.originalPrice === p.salePrice ? void 0 : p.originalPrice,
11
+ pricePrefix: "$",
12
+ rate: p.averageRating ?? 0,
13
+ numberOfReviews: p.numberReviews ?? 0,
14
+ image: {
15
+ src: p.imageUrl ?? "",
16
+ alt: `${p.title ?? ""} image`
17
+ },
18
+ url: p.url
19
+ });
20
+ const useWelcomeOverlayProducts = (productIds) => {
21
+ const [products, setProducts] = (0, react.useState)([]);
22
+ const [isLoading, setIsLoading] = (0, react.useState)(productIds.length > 0);
23
+ (0, react.useEffect)(() => {
24
+ let cancelled = false;
25
+ if (productIds.length === 0) return () => {};
26
+ setIsLoading(true);
27
+ __envive_ai_react_hooks_application_commerce_api.default.retrieveProducts(productIds).then((result) => {
28
+ if (!cancelled) setProducts(result.products.map(mapToCardProps));
29
+ }).catch(() => {}).finally(() => {
30
+ if (!cancelled) setIsLoading(false);
31
+ });
32
+ return () => {
33
+ cancelled = true;
34
+ };
35
+ }, []);
36
+ return {
37
+ products,
38
+ isLoading
39
+ };
40
+ };
41
+
42
+ //#endregion
43
+ exports.useWelcomeOverlayProducts = useWelcomeOverlayProducts;
@@ -0,0 +1,41 @@
1
+ import { useEffect, useState } from "react";
2
+ import CommerceApiClient from "@envive-ai/react-hooks/application/commerce-api";
3
+
4
+ //#region src/components/FullPageSalesAgent/hooks/useWelcomeOverlayProducts.ts
5
+ const mapToCardProps = (p) => ({
6
+ productName: p.title ?? "",
7
+ currentPrice: p.salePrice ?? 0,
8
+ previousPrice: p.originalPrice === p.salePrice ? void 0 : p.originalPrice,
9
+ pricePrefix: "$",
10
+ rate: p.averageRating ?? 0,
11
+ numberOfReviews: p.numberReviews ?? 0,
12
+ image: {
13
+ src: p.imageUrl ?? "",
14
+ alt: `${p.title ?? ""} image`
15
+ },
16
+ url: p.url
17
+ });
18
+ const useWelcomeOverlayProducts = (productIds) => {
19
+ const [products, setProducts] = useState([]);
20
+ const [isLoading, setIsLoading] = useState(productIds.length > 0);
21
+ useEffect(() => {
22
+ let cancelled = false;
23
+ if (productIds.length === 0) return () => {};
24
+ setIsLoading(true);
25
+ CommerceApiClient.retrieveProducts(productIds).then((result) => {
26
+ if (!cancelled) setProducts(result.products.map(mapToCardProps));
27
+ }).catch(() => {}).finally(() => {
28
+ if (!cancelled) setIsLoading(false);
29
+ });
30
+ return () => {
31
+ cancelled = true;
32
+ };
33
+ }, []);
34
+ return {
35
+ products,
36
+ isLoading
37
+ };
38
+ };
39
+
40
+ //#endregion
41
+ export { useWelcomeOverlayProducts };
@@ -1,5 +1,5 @@
1
1
  import { ImageProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime29 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/Image/Image.d.ts
5
5
 
@@ -25,6 +25,6 @@ declare const Image: ({
25
25
  role,
26
26
  "aria-hidden": ariaHidden,
27
27
  ...rest
28
- }: ImageProps) => react_jsx_runtime0.JSX.Element;
28
+ }: ImageProps) => react_jsx_runtime29.JSX.Element;
29
29
  //#endregion
30
30
  export { Image };
@@ -1,5 +1,5 @@
1
1
  import { ImageGalleryProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ImageGallery/ImageGallery.d.ts
5
5
 
@@ -40,6 +40,6 @@ declare const ImageGallery: ({
40
40
  "aria-describedby": ariaDescribedBy,
41
41
  role,
42
42
  "aria-hidden": ariaHidden
43
- }: ImageGalleryProps) => react_jsx_runtime2.JSX.Element;
43
+ }: ImageGalleryProps) => react_jsx_runtime11.JSX.Element;
44
44
  //#endregion
45
45
  export { ImageGallery };
@@ -1,5 +1,5 @@
1
1
  import { ImageGalleryProps } from "./types/types.js";
2
- import * as react_jsx_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ImageGallery/ImageGallery.d.ts
5
5
 
@@ -40,6 +40,6 @@ declare const ImageGallery: ({
40
40
  "aria-describedby": ariaDescribedBy,
41
41
  role,
42
42
  "aria-hidden": ariaHidden
43
- }: ImageGalleryProps) => react_jsx_runtime15.JSX.Element;
43
+ }: ImageGalleryProps) => react_jsx_runtime18.JSX.Element;
44
44
  //#endregion
45
45
  export { ImageGallery };
@@ -1,5 +1,5 @@
1
1
  import { MarkdownProcessorProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime44 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime15 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
5
5
  declare const MarkdownProcessor: ({
@@ -8,6 +8,6 @@ declare const MarkdownProcessor: ({
8
8
  textColor,
9
9
  textVariant,
10
10
  onLinkClick
11
- }: MarkdownProcessorProps) => react_jsx_runtime44.JSX.Element;
11
+ }: MarkdownProcessorProps) => react_jsx_runtime15.JSX.Element;
12
12
  //#endregion
13
13
  export { MarkdownProcessor };
@@ -1,5 +1,5 @@
1
1
  import { MarkdownProcessorProps } from "./types/types.js";
2
- import * as react_jsx_runtime34 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime24 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
5
5
  declare const MarkdownProcessor: ({
@@ -8,6 +8,6 @@ declare const MarkdownProcessor: ({
8
8
  textColor,
9
9
  textVariant,
10
10
  onLinkClick
11
- }: MarkdownProcessorProps) => react_jsx_runtime34.JSX.Element;
11
+ }: MarkdownProcessorProps) => react_jsx_runtime24.JSX.Element;
12
12
  //#endregion
13
13
  export { MarkdownProcessor };
@@ -3,9 +3,9 @@ const require_index = require('../../Typography/types/index.cjs');
3
3
  const require_Typography = require('../../Typography/Typography.cjs');
4
4
  require('../../Typography/index.cjs');
5
5
  const require_CustomIcon = require('../../utils/CustomIcon.cjs');
6
+ const require_openUrlInNewTab = require('../utils/openUrlInNewTab.cjs');
6
7
  const require_useGetLinkButtonIconProperties = require('../hooks/useGetLinkButtonIconProperties.cjs');
7
8
  const require_useGetLinkButtonProperties = require('../hooks/useGetLinkButtonProperties.cjs');
8
- const require_openUrlInNewTab = require('../utils/openUrlInNewTab.cjs');
9
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
10
  let __envive_ai_react_icons_VectorUpRight = require("@envive-ai/react-icons/VectorUpRight");
11
11
  __envive_ai_react_icons_VectorUpRight = require_rolldown_runtime.__toESM(__envive_ai_react_icons_VectorUpRight);
@@ -2,9 +2,9 @@ import { TypographyColor, TypographyVariant } from "../../Typography/types/index
2
2
  import { Typography } from "../../Typography/Typography.js";
3
3
  import "../../Typography/index.js";
4
4
  import { CustomIcon } from "../../utils/CustomIcon.js";
5
+ import { openUrlInNewTab } from "../utils/openUrlInNewTab.js";
5
6
  import { useGetLinkButtonIconProperties } from "../hooks/useGetLinkButtonIconProperties.js";
6
7
  import { useGetLinkButtonProperties } from "../hooks/useGetLinkButtonProperties.js";
7
- import { openUrlInNewTab } from "../utils/openUrlInNewTab.js";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import VectorUpRight from "@envive-ai/react-icons/VectorUpRight";
10
10
 
@@ -1,5 +1,5 @@
1
1
  import { ProductCardProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime35 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ProductCard/ProductCard.d.ts
5
5
  declare const ProductCard: ({
@@ -27,6 +27,6 @@ declare const ProductCard: ({
27
27
  onInputClick,
28
28
  onTranscriptionStarted,
29
29
  onTranscriptionCompleted
30
- }: ProductCardProps) => react_jsx_runtime15.JSX.Element;
30
+ }: ProductCardProps) => react_jsx_runtime35.JSX.Element;
31
31
  //#endregion
32
32
  export { ProductCard };
@@ -1,5 +1,5 @@
1
1
  import { ProductCardProps } from "./types/index.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ProductCard/ProductCard.d.ts
5
5
  declare const ProductCard: ({
@@ -27,6 +27,6 @@ declare const ProductCard: ({
27
27
  onInputClick,
28
28
  onTranscriptionStarted,
29
29
  onTranscriptionCompleted
30
- }: ProductCardProps) => react_jsx_runtime0.JSX.Element;
30
+ }: ProductCardProps) => react_jsx_runtime20.JSX.Element;
31
31
  //#endregion
32
32
  export { ProductCard };
@@ -1,5 +1,5 @@
1
1
  import { PromptButtonProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime14 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/PromptButton/PromptButton.d.ts
5
5
  declare const PromptButton: ({
@@ -22,6 +22,6 @@ declare const PromptButton: ({
22
22
  onTouchEnd,
23
23
  ariaLabel,
24
24
  ariaDescribedBy
25
- }: PromptButtonProps) => react_jsx_runtime14.JSX.Element;
25
+ }: PromptButtonProps) => react_jsx_runtime2.JSX.Element;
26
26
  //#endregion
27
27
  export { PromptButton };
@@ -1,5 +1,5 @@
1
1
  import { PromptButtonProps } from "./types/index.js";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime26 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/PromptButton/PromptButton.d.ts
5
5
  declare const PromptButton: ({
@@ -22,6 +22,6 @@ declare const PromptButton: ({
22
22
  onTouchEnd,
23
23
  ariaLabel,
24
24
  ariaDescribedBy
25
- }: PromptButtonProps) => react_jsx_runtime10.JSX.Element;
25
+ }: PromptButtonProps) => react_jsx_runtime26.JSX.Element;
26
26
  //#endregion
27
27
  export { PromptButton };
@@ -5,7 +5,7 @@ classnames = require_rolldown_runtime.__toESM(classnames);
5
5
  //#region src/components/PromptButton/hooks/useGetLayoutBaseProperties.ts
6
6
  const useGetLayoutBaseProperties = ({ isDisabled, isLoading }) => {
7
7
  return {
8
- baseClasses: (0, classnames.default)("envive-tw-h-fit envive-tw-w-fit", "envive-tw-rounded-global-custom", "envive-tw-px-4 envive-tw-py-2", "envive-tw-group"),
8
+ baseClasses: (0, classnames.default)("envive-tw-h-fit", "envive-tw-rounded-global-custom", "envive-tw-px-4 envive-tw-py-2", "envive-tw-group", "envive-tw-w-[stretch]", "envive-tw-max-w-min"),
9
9
  isLoadingClasses: (0, classnames.default)(isLoading && "envive-tw-pointer-events-none envive-tw-cursor-not-allowed"),
10
10
  isDisabledClasses: (0, classnames.default)(isDisabled && "envive-tw-opacity-50 envive-tw-cursor-not-allowed")
11
11
  };
@@ -3,7 +3,7 @@ import classNames from "classnames";
3
3
  //#region src/components/PromptButton/hooks/useGetLayoutBaseProperties.ts
4
4
  const useGetLayoutBaseProperties = ({ isDisabled, isLoading }) => {
5
5
  return {
6
- baseClasses: classNames("envive-tw-h-fit envive-tw-w-fit", "envive-tw-rounded-global-custom", "envive-tw-px-4 envive-tw-py-2", "envive-tw-group"),
6
+ baseClasses: classNames("envive-tw-h-fit", "envive-tw-rounded-global-custom", "envive-tw-px-4 envive-tw-py-2", "envive-tw-group", "envive-tw-w-[stretch]", "envive-tw-max-w-min"),
7
7
  isLoadingClasses: classNames(isLoading && "envive-tw-pointer-events-none envive-tw-cursor-not-allowed"),
8
8
  isDisabledClasses: classNames(isDisabled && "envive-tw-opacity-50 envive-tw-cursor-not-allowed")
9
9
  };
@@ -1,5 +1,5 @@
1
1
  import { PromptButtonCarouselWithImageProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime25 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts
5
5
  declare const PromptButtonCarouselWithImage: ({
@@ -27,6 +27,6 @@ declare const PromptButtonCarouselWithImage: ({
27
27
  handleTextFieldClick,
28
28
  onTranscriptionStarted,
29
29
  onTranscriptionCompleted
30
- }: PromptButtonCarouselWithImageProps) => react_jsx_runtime12.JSX.Element;
30
+ }: PromptButtonCarouselWithImageProps) => react_jsx_runtime25.JSX.Element;
31
31
  //#endregion
32
32
  export { PromptButtonCarouselWithImage };
@@ -1,5 +1,5 @@
1
1
  import { PromptButtonCarouselWithImageProps } from "./types/types.js";
2
- import * as react_jsx_runtime25 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts
5
5
  declare const PromptButtonCarouselWithImage: ({
@@ -27,6 +27,6 @@ declare const PromptButtonCarouselWithImage: ({
27
27
  handleTextFieldClick,
28
28
  onTranscriptionStarted,
29
29
  onTranscriptionCompleted
30
- }: PromptButtonCarouselWithImageProps) => react_jsx_runtime25.JSX.Element;
30
+ }: PromptButtonCarouselWithImageProps) => react_jsx_runtime19.JSX.Element;
31
31
  //#endregion
32
32
  export { PromptButtonCarouselWithImage };
@@ -1,5 +1,5 @@
1
1
  import { PromptCarouselProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime23 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/PromptCarousel/PromptCarousel.d.ts
5
5
  declare const PromptCarousel: ({
@@ -26,6 +26,6 @@ declare const PromptCarousel: ({
26
26
  "aria-labelledby": ariaLabelledBy,
27
27
  "aria-describedby": ariaDescribedBy,
28
28
  role
29
- }: PromptCarouselProps) => react_jsx_runtime9.JSX.Element;
29
+ }: PromptCarouselProps) => react_jsx_runtime23.JSX.Element;
30
30
  //#endregion
31
31
  export { PromptCarousel };
@@ -1,5 +1,5 @@
1
1
  import { PromptCarouselProps } from "./types/types.js";
2
- import * as react_jsx_runtime21 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/PromptCarousel/PromptCarousel.d.ts
5
5
  declare const PromptCarousel: ({
@@ -26,6 +26,6 @@ declare const PromptCarousel: ({
26
26
  "aria-labelledby": ariaLabelledBy,
27
27
  "aria-describedby": ariaDescribedBy,
28
28
  role
29
- }: PromptCarouselProps) => react_jsx_runtime21.JSX.Element;
29
+ }: PromptCarouselProps) => react_jsx_runtime16.JSX.Element;
30
30
  //#endregion
31
31
  export { PromptCarousel };
@@ -1,5 +1,5 @@
1
1
  import { ReviewCardProps } from "./types/types.cjs";
2
- import * as react_jsx_runtime19 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ReviewCard/ReviewCard.d.ts
5
5
 
@@ -27,6 +27,6 @@ declare const ReviewCard: ({
27
27
  verifiedBuyerLabel,
28
28
  onExpand,
29
29
  onCollapse
30
- }: ReviewCardProps) => react_jsx_runtime19.JSX.Element;
30
+ }: ReviewCardProps) => react_jsx_runtime22.JSX.Element;
31
31
  //#endregion
32
32
  export { ReviewCard };
@@ -1,5 +1,5 @@
1
1
  import { ReviewCardProps } from "./types/types.js";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/ReviewCard/ReviewCard.d.ts
5
5
 
@@ -27,6 +27,6 @@ declare const ReviewCard: ({
27
27
  verifiedBuyerLabel,
28
28
  onExpand,
29
29
  onCollapse
30
- }: ReviewCardProps) => react_jsx_runtime11.JSX.Element;
30
+ }: ReviewCardProps) => react_jsx_runtime6.JSX.Element;
31
31
  //#endregion
32
32
  export { ReviewCard };