@envive-ai/react-widgets-v3 0.3.40 → 0.3.41

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 (62) hide show
  1. package/dist/debug/chatEmbed.cjs +1 -1
  2. package/dist/debug/chatEmbed.js +1 -1
  3. package/dist/debug/reportIssue.cjs +1 -1
  4. package/dist/debug/reportIssue.js +1 -1
  5. package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
  6. package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
  7. package/dist/packages/widgets/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
  8. package/dist/packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
  9. package/dist/packages/widgets/dist/SuggestionBar/SuggestionBar.d.ts +2 -2
  10. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +6 -6
  11. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
  12. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +6 -6
  13. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
  14. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
  15. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +4 -4
  16. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
  17. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +4 -4
  18. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +5 -0
  19. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +5 -0
  20. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +3 -3
  21. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
  22. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
  23. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +3 -3
  24. package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.cjs +1 -1
  25. package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.js +1 -1
  26. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
  27. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
  28. package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +3 -3
  29. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
  30. package/dist/widgets/ProductCardWidget/ProductCardWidget.js +3 -3
  31. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +6 -9
  32. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
  33. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
  34. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +8 -11
  35. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +3 -3
  36. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
  37. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
  38. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +3 -3
  39. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
  40. package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +7 -7
  41. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
  42. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
  43. package/dist/widgets/SocialProofWidget/SocialProofWidget.js +7 -7
  44. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +2 -2
  45. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
  46. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
  47. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +2 -2
  48. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
  49. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +3 -3
  50. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
  51. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
  52. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +3 -3
  53. package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
  54. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
  55. package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +2 -2
  56. package/dist/widgets/hooks/useGetWidgetStatus.cjs +1 -1
  57. package/dist/widgets/hooks/useGetWidgetStatus.js +1 -1
  58. package/dist/widgets/utils/functions.cjs +1 -1
  59. package/dist/widgets/utils/functions.js +1 -1
  60. package/package.json +1 -1
  61. package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +5 -1
  62. package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +4 -11
@@ -3,10 +3,10 @@ const require_MessageContent = require('./MessageContent.cjs');
3
3
  let react = require("react");
4
4
  react = require_rolldown_runtime.__toESM(react);
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
+ let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
6
7
  let jotai = require("jotai");
7
8
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
8
9
  let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
9
- let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
10
10
  let classnames = require("classnames");
11
11
  classnames = require_rolldown_runtime.__toESM(classnames);
12
12
 
@@ -1,10 +1,10 @@
1
1
  import { MessageContent } from "./MessageContent.js";
2
2
  import React from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { chatAtom } from "@envive-ai/react-hooks/atoms/chat";
4
5
  import { useAtomValue } from "jotai";
5
6
  import { MessageType } from "@envive-ai/react-hooks/application/models";
6
7
  import { PromptCarousel, PromptCarouselRows } from "@envive-ai/react-toolkit-v3/PromptCarousel";
7
- import { chatAtom } from "@envive-ai/react-hooks/atoms/chat";
8
8
  import classNames from "classnames";
9
9
 
10
10
  //#region src/debug/chatEmbed.tsx
@@ -5,9 +5,9 @@ const require_GenericSelect = require('./GenericSelect.cjs');
5
5
  const require_chatEmbed = require('./chatEmbed.cjs');
6
6
  let react = require("react");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
+ let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
8
9
  let jotai = require("jotai");
9
10
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
10
- let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
11
11
  let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
12
12
  let classnames = require("classnames");
13
13
  classnames = require_rolldown_runtime.__toESM(classnames);
@@ -3,9 +3,9 @@ import { GenericSelect } from "./GenericSelect.js";
3
3
  import chatEmbed_default from "./chatEmbed.js";
4
4
  import { useCallback, useEffect, useState } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
6
7
  import { useAtomValue } from "jotai";
7
8
  import { MessageType } from "@envive-ai/react-hooks/application/models";
8
- import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
9
9
  import { userIdAtom } from "@envive-ai/react-hooks/atoms/app";
10
10
  import { ReportSessionRequestReportPriorityEnum, ReportSessionRequestReportTypeEnum } from "@spiffy-ai/commerce-api-client";
11
11
  import classNames from "classnames";
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.cjs";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/hocs/withBaseWidget/withBaseWidget.d.ts
5
5
  declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
6
- (props: P): react_jsx_runtime10.JSX.Element;
6
+ (props: P): react_jsx_runtime13.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.js";
2
- import * as react_jsx_runtime17 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/hocs/withBaseWidget/withBaseWidget.d.ts
5
5
  declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
6
- (props: P): react_jsx_runtime17.JSX.Element;
6
+ (props: P): react_jsx_runtime18.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  //#endregion
@@ -1,8 +1,8 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
 
3
3
  //#region ../widgets/dist/SearchResults/SearchResultsWidget.d.ts
4
4
  //#region src/SearchResults/SearchResultsWidget.d.ts
5
- declare const SearchResultsWidget: () => react_jsx_runtime0.JSX.Element;
5
+ declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
6
6
  //#endregion
7
7
 
8
8
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
2
2
 
3
3
  //#region ../widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts
4
4
  //#region src/SearchZeroState/SearchZeroStateWidget.d.ts
@@ -11,7 +11,7 @@ declare const SearchZeroStateWidget: ({
11
11
  initialIsOpen,
12
12
  widgetConfigId,
13
13
  entryPointRef
14
- }: SearchZeroStateWidgetProps) => react_jsx_runtime2.JSX.Element;
14
+ }: SearchZeroStateWidgetProps) => react_jsx_runtime3.JSX.Element;
15
15
  //#endregion
16
16
 
17
17
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { SuggestionBarLocationForMetrics } from "./types.js";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
  import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
4
4
  import { Message } from "postcss";
5
5
 
@@ -30,7 +30,7 @@ declare function SuggestionBar({
30
30
  buttonBorderRadius,
31
31
  handleReply,
32
32
  dataTestId
33
- }: Readonly<SuggestionBarProps>): react_jsx_runtime3.JSX.Element;
33
+ }: Readonly<SuggestionBarProps>): react_jsx_runtime2.JSX.Element;
34
34
  //#endregion
35
35
  //#endregion
36
36
  export { SuggestionBar };
@@ -5,19 +5,19 @@ const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/Ch
5
5
  let react = require("react");
6
6
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
+ let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
9
+ let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
8
10
  let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
11
+ let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
9
12
  let jotai = require("jotai");
10
13
  let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
11
14
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
12
- let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
13
- let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
14
- let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
15
- let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
16
- let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
17
- let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
18
15
  let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
19
16
  let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
17
+ let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
20
18
  let __envive_ai_react_toolkit_v3_ChatPreviewComparison = require("@envive-ai/react-toolkit-v3/ChatPreviewComparison");
19
+ let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
20
+ let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
21
21
 
22
22
  //#region src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx
23
23
  const ChatPreviewComparisonWidgetHandler = (props) => {
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
2
- import * as react_jsx_runtime14 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts
5
5
  declare const ChatPreviewComparisonWidgetWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime14.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime16.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  interface ChatPreviewComparisonWidgetProps {
@@ -12,7 +12,7 @@ interface ChatPreviewComparisonWidgetProps {
12
12
  declare const ChatPreviewComparisonWidget: {
13
13
  ({
14
14
  widgetConfigId
15
- }: ChatPreviewComparisonWidgetProps): react_jsx_runtime14.JSX.Element;
15
+ }: ChatPreviewComparisonWidgetProps): react_jsx_runtime16.JSX.Element;
16
16
  displayName: string;
17
17
  };
18
18
  //#endregion
@@ -4,19 +4,19 @@ import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWid
4
4
  import { useCallback, useMemo } from "react";
5
5
  import { EnviveMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
6
6
  import { jsx } from "react/jsx-runtime";
7
+ import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
8
+ import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
7
9
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
10
+ import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
8
11
  import { useAtomValue } from "jotai";
9
12
  import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
10
13
  import { ChatElementDisplayLocationV3, FeatureGates, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
11
- import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
12
- import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
13
- import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
14
- import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
15
- import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
16
- import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
17
14
  import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
18
15
  import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
16
+ import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
19
17
  import { ChatPreviewComparison } from "@envive-ai/react-toolkit-v3/ChatPreviewComparison";
18
+ import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
19
+ import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
20
20
 
21
21
  //#region src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx
22
22
  const ChatPreviewComparisonWidgetHandler = (props) => {
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts
5
5
  declare const ChatPreviewLoadingWidgetWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime1.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime11.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  interface ChatPreviewLoadingWidgetProps {
@@ -11,6 +11,6 @@ interface ChatPreviewLoadingWidgetProps {
11
11
  }
12
12
  declare const ChatPreviewLoadingWidget: ({
13
13
  widgetConfigId
14
- }: ChatPreviewLoadingWidgetProps) => react_jsx_runtime1.JSX.Element;
14
+ }: ChatPreviewLoadingWidgetProps) => react_jsx_runtime11.JSX.Element;
15
15
  //#endregion
16
16
  export { ChatPreviewLoadingWidget, ChatPreviewLoadingWidgetProps, ChatPreviewLoadingWidgetWithBaseWidget };
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
2
- import * as react_jsx_runtime18 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts
5
5
  declare const ChatPreviewLoadingWidgetWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime18.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime6.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  interface ChatPreviewLoadingWidgetProps {
@@ -11,6 +11,6 @@ interface ChatPreviewLoadingWidgetProps {
11
11
  }
12
12
  declare const ChatPreviewLoadingWidget: ({
13
13
  widgetConfigId
14
- }: ChatPreviewLoadingWidgetProps) => react_jsx_runtime18.JSX.Element;
14
+ }: ChatPreviewLoadingWidgetProps) => react_jsx_runtime6.JSX.Element;
15
15
  //#endregion
16
16
  export { ChatPreviewLoadingWidget, ChatPreviewLoadingWidgetProps, ChatPreviewLoadingWidgetWithBaseWidget };
@@ -5,17 +5,17 @@ const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/Ch
5
5
  let react = require("react");
6
6
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
+ let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
9
+ let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
8
10
  let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
11
+ let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
9
12
  let jotai = require("jotai");
10
13
  let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
11
14
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
12
- let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
13
- let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
15
+ let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
14
16
  let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
15
17
  let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
16
18
  let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
17
- let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
18
- let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
19
19
  let __envive_ai_react_toolkit_v3_ChatPreview = require("@envive-ai/react-toolkit-v3/ChatPreview");
20
20
 
21
21
  //#region src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts
5
5
  declare const ChatPreviewWidgetWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime9.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime12.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  interface ChatPreviewWidgetProps {
@@ -12,7 +12,7 @@ interface ChatPreviewWidgetProps {
12
12
  declare const ChatPreviewWidget: {
13
13
  ({
14
14
  widgetConfigId
15
- }: ChatPreviewWidgetProps): react_jsx_runtime9.JSX.Element;
15
+ }: ChatPreviewWidgetProps): react_jsx_runtime12.JSX.Element;
16
16
  displayName: string;
17
17
  };
18
18
  //#endregion
@@ -4,17 +4,17 @@ import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWid
4
4
  import { useCallback, useMemo } from "react";
5
5
  import { EnviveMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
6
6
  import { jsx } from "react/jsx-runtime";
7
+ import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
8
+ import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
7
9
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
10
+ import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
8
11
  import { useAtomValue } from "jotai";
9
12
  import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
10
13
  import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
11
- import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
12
- import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
14
+ import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
13
15
  import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
14
16
  import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
15
17
  import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
16
- import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
17
- import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
18
18
  import { ChatPreview } from "@envive-ai/react-toolkit-v3/ChatPreview";
19
19
 
20
20
  //#region src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx
@@ -1,9 +1,11 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ let react = require("react");
2
3
  let react_jsx_runtime = require("react/jsx-runtime");
3
4
  let classnames = require("classnames");
4
5
  classnames = require_rolldown_runtime.__toESM(classnames);
5
6
  let framer_motion = require("framer-motion");
6
7
  let __envive_ai_react_toolkit_v3_utils_useCheckIsMobile = require("@envive-ai/react-toolkit-v3/utils/useCheckIsMobile");
8
+ let __envive_ai_react_hooks_hooks_FocusTrap = require("@envive-ai/react-hooks/hooks/FocusTrap");
7
9
 
8
10
  //#region src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx
9
11
  const ANIMATION_DURATION = .3;
@@ -39,6 +41,8 @@ const FloatingChatOverlay = ({ children, isOpened, onClose, className, dataTestI
39
41
  previewMode,
40
42
  isMobile
41
43
  });
44
+ const dialogRef = (0, react.useRef)(null);
45
+ (0, __envive_ai_react_hooks_hooks_FocusTrap.useFocusTrap)(dialogRef, isOpened && !previewMode);
42
46
  const overlayClasses = (0, classnames.default)(previewMode ? "envive-tw-absolute" : "envive-tw-fixed", "envive-tw-top-0", "envive-tw-left-0", previewMode ? "envive-tw-h-full" : "envive-tw-h-screen", "envive-tw-w-full", "envive-tw-z-[2147483647]", className);
43
47
  const backdropClasses = (0, classnames.default)("envive-tw-absolute", "envive-tw-top-0", "envive-tw-left-0", "envive-tw-h-full", "envive-tw-w-full", isMobile ? "envive-tw-bg-black" : "", "envive-tw-opacity-50", "envive-tw-pointer-events-none", "envive-tw-z-0");
44
48
  const overlayContentClasses = (0, classnames.default)("envive-tw-relative", "envive-tw-flex", "envive-tw-justify-end", "envive-tw-items-stretch", "envive-tw-h-full", "envive-tw-w-full", "envive-tw-pointer-events-auto", "envive-tw-cursor-pointer", "envive-tw-z-10");
@@ -68,6 +72,7 @@ const FloatingChatOverlay = ({ children, isOpened, onClose, className, dataTestI
68
72
  tabIndex: 0,
69
73
  "aria-label": "Close floating chat",
70
74
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.motion.div, {
75
+ ref: dialogRef,
71
76
  initial: overlayExitAnimation,
72
77
  animate: overlayAnimation,
73
78
  exit: overlayExitAnimation,
@@ -1,7 +1,9 @@
1
+ import { useRef } from "react";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import classNames from "classnames";
3
4
  import { AnimatePresence, motion } from "framer-motion";
4
5
  import { useCheckIsMobile } from "@envive-ai/react-toolkit-v3/utils/useCheckIsMobile";
6
+ import { useFocusTrap } from "@envive-ai/react-hooks/hooks/FocusTrap";
5
7
 
6
8
  //#region src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx
7
9
  const ANIMATION_DURATION = .3;
@@ -37,6 +39,8 @@ const FloatingChatOverlay = ({ children, isOpened, onClose, className, dataTestI
37
39
  previewMode,
38
40
  isMobile
39
41
  });
42
+ const dialogRef = useRef(null);
43
+ useFocusTrap(dialogRef, isOpened && !previewMode);
40
44
  const overlayClasses = classNames(previewMode ? "envive-tw-absolute" : "envive-tw-fixed", "envive-tw-top-0", "envive-tw-left-0", previewMode ? "envive-tw-h-full" : "envive-tw-h-screen", "envive-tw-w-full", "envive-tw-z-[2147483647]", className);
41
45
  const backdropClasses = classNames("envive-tw-absolute", "envive-tw-top-0", "envive-tw-left-0", "envive-tw-h-full", "envive-tw-w-full", isMobile ? "envive-tw-bg-black" : "", "envive-tw-opacity-50", "envive-tw-pointer-events-none", "envive-tw-z-0");
42
46
  const overlayContentClasses = classNames("envive-tw-relative", "envive-tw-flex", "envive-tw-justify-end", "envive-tw-items-stretch", "envive-tw-h-full", "envive-tw-w-full", "envive-tw-pointer-events-auto", "envive-tw-cursor-pointer", "envive-tw-z-10");
@@ -66,6 +70,7 @@ const FloatingChatOverlay = ({ children, isOpened, onClose, className, dataTestI
66
70
  tabIndex: 0,
67
71
  "aria-label": "Close floating chat",
68
72
  children: /* @__PURE__ */ jsx(motion.div, {
73
+ ref: dialogRef,
69
74
  initial: overlayExitAnimation,
70
75
  animate: overlayAnimation,
71
76
  exit: overlayExitAnimation,
@@ -13,14 +13,14 @@ let react = require("react");
13
13
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
14
14
  let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
15
15
  let react_jsx_runtime = require("react/jsx-runtime");
16
+ let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
16
17
  let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
18
+ let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
17
19
  let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
18
20
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
19
- let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
20
- let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
21
+ let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
21
22
  let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
22
23
  let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
23
- let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
24
24
  let __envive_ai_react_toolkit_v3_FloatingButton = require("@envive-ai/react-toolkit-v3/FloatingButton");
25
25
 
26
26
  //#region src/widgets/FloatingChatWidget/FloatingChatWidget.tsx
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime18 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime16 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts
4
4
  interface FloatingChatWidgetProps {
@@ -13,7 +13,7 @@ declare const FloatingChatWidget: {
13
13
  previewChatAlwaysOpen,
14
14
  previewCXButtonsEnabled,
15
15
  previewDisclaimer
16
- }?: FloatingChatWidgetProps): react_jsx_runtime18.JSX.Element;
16
+ }?: FloatingChatWidgetProps): react_jsx_runtime16.JSX.Element;
17
17
  displayName: string;
18
18
  };
19
19
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime16 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts
4
4
  interface FloatingChatWidgetProps {
@@ -13,7 +13,7 @@ declare const FloatingChatWidget: {
13
13
  previewChatAlwaysOpen,
14
14
  previewCXButtonsEnabled,
15
15
  previewDisclaimer
16
- }?: FloatingChatWidgetProps): react_jsx_runtime16.JSX.Element;
16
+ }?: FloatingChatWidgetProps): react_jsx_runtime8.JSX.Element;
17
17
  displayName: string;
18
18
  };
19
19
  //#endregion
@@ -12,14 +12,14 @@ import { Suspense, lazy, useEffect, useMemo, useRef, useState } from "react";
12
12
  import { EnviveMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
13
13
  import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
15
16
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
17
+ import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
16
18
  import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
17
19
  import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
18
- import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
19
- import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
20
+ import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
20
21
  import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
21
22
  import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
22
- import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
23
23
  import { FloatingButton } from "@envive-ai/react-toolkit-v3/FloatingButton";
24
24
 
25
25
  //#region src/widgets/FloatingChatWidget/FloatingChatWidget.tsx
@@ -1,8 +1,8 @@
1
1
  const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
2
  let react = require("react");
3
+ let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
3
4
  let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
4
5
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
5
- let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
6
6
 
7
7
  //#region src/widgets/FloatingChatWidget/hooks/useAutoPopup.ts
8
8
  const useAutoPopup = ({ autoPopupConfig }) => {
@@ -1,7 +1,7 @@
1
1
  import { useCallback, useEffect, useMemo, useRef } from "react";
2
+ import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
2
3
  import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
3
4
  import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
4
- import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
5
5
 
6
6
  //#region src/widgets/FloatingChatWidget/hooks/useAutoPopup.ts
7
7
  const useAutoPopup = ({ autoPopupConfig }) => {
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts
4
4
 
@@ -8,7 +8,7 @@ interface FullPageSalesAgentBaseWidgetProps {
8
8
  declare const FullPageSalesAgentWidget: {
9
9
  ({
10
10
  widgetConfigId
11
- }: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime3.JSX.Element;
11
+ }: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime9.JSX.Element;
12
12
  displayName: string;
13
13
  };
14
14
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime12 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts
4
4
 
@@ -8,7 +8,7 @@ interface FullPageSalesAgentBaseWidgetProps {
8
8
  declare const FullPageSalesAgentWidget: {
9
9
  ({
10
10
  widgetConfigId
11
- }: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime12.JSX.Element;
11
+ }: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime14.JSX.Element;
12
12
  displayName: string;
13
13
  };
14
14
  //#endregion
@@ -5,15 +5,15 @@ const require_functions = require('../utils/functions.cjs');
5
5
  let react = require("react");
6
6
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
+ let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
8
9
  let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
10
+ let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
9
11
  let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
10
12
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
11
- let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
12
- let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
13
+ let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
13
14
  let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
14
15
  let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
15
16
  let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
16
- let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
17
17
  let __envive_ai_react_toolkit_v3_ProductCard = require("@envive-ai/react-toolkit-v3/ProductCard");
18
18
  let __envive_ai_react_toolkit_v3_PromptButton_types = require("@envive-ai/react-toolkit-v3/PromptButton/types");
19
19
 
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/ProductCardWidget/ProductCardWidget.d.ts
4
4
  interface ProductCardWidgetProps {
@@ -7,7 +7,7 @@ interface ProductCardWidgetProps {
7
7
  declare const ProductCardWidget: {
8
8
  ({
9
9
  widgetConfigId
10
- }: ProductCardWidgetProps): react_jsx_runtime9.JSX.Element;
10
+ }: ProductCardWidgetProps): react_jsx_runtime0.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -4,15 +4,15 @@ import { getStringIdForText } from "../utils/functions.js";
4
4
  import { useCallback } from "react";
5
5
  import { EnviveMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
6
6
  import { jsx } from "react/jsx-runtime";
7
+ import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
7
8
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
9
+ import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
8
10
  import { useFeatureFlagService } from "@envive-ai/react-hooks/contexts/featureFlagServiceContext";
9
11
  import { ChatElementDisplayLocationV3, FeatureGates } from "@envive-ai/react-hooks/application/models";
10
- import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
11
- import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
12
+ import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
12
13
  import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
13
14
  import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
14
15
  import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
15
- import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
16
16
  import { ProductCard, ProductCardVariant } from "@envive-ai/react-toolkit-v3/ProductCard";
17
17
  import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton/types";
18
18
 
@@ -4,19 +4,19 @@ const require_functions = require('../utils/functions.cjs');
4
4
  let react = require("react");
5
5
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
+ let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
7
8
  let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
9
+ let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
8
10
  let jotai = require("jotai");
9
11
  let __envive_ai_react_hooks_contexts_featureFlagServiceContext = require("@envive-ai/react-hooks/contexts/featureFlagServiceContext");
10
12
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
11
- let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
12
- let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
13
+ let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
14
+ let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
13
15
  let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
14
16
  let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
15
17
  let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
16
- let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
17
- let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
18
- let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
19
18
  let __envive_ai_react_toolkit_v3_PromptButtonCarouselWithImage = require("@envive-ai/react-toolkit-v3/PromptButtonCarouselWithImage");
19
+ let __envive_ai_react_hooks_hooks_ProductImageUrl = require("@envive-ai/react-hooks/hooks/ProductImageUrl");
20
20
 
21
21
  //#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx
22
22
  const PromptButtonCarouselWithImageWidgetHandler = (props) => {
@@ -82,10 +82,7 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
82
82
  });
83
83
  }, []);
84
84
  const variantInfo = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_app.variantInfoAtom);
85
- const productId = variantInfo.variant === __envive_ai_react_hooks_application_models.VariantTypeEnum.Pdp ? variantInfo.productId : void 0;
86
- const lastAssistantMessage = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_chat.lastAssistantMessageAtom);
87
- const productImageUrls = (0, react.useMemo)(() => lastAssistantMessage ? require_functions.getRecentProductImageUrls(lastAssistantMessage, productId) : [], [lastAssistantMessage, productId]);
88
- const productImageUrl = productImageUrls[1] ?? productImageUrls[0] ?? "";
85
+ const productImageUrl = (0, __envive_ai_react_hooks_hooks_ProductImageUrl.useProductImageUrl)(variantInfo.variant === __envive_ai_react_hooks_application_models.VariantTypeEnum.Pdp ? variantInfo.productId : void 0);
89
86
  const isDynamic = promptButtonCarouselWithImageWidgetConfig?.isDynamic ?? false;
90
87
  const finalImageSrc = isDynamic ? productImageUrl : promptButtonCarouselWithImageWidgetConfig?.image?.src;
91
88
  const finalImageAlt = isDynamic ? "Product Image From Page" : promptButtonCarouselWithImageWidgetConfig?.image?.alt;
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
2
- import * as react_jsx_runtime13 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
5
5
  declare const PromptButtonCarouselWithImageWidgetWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime13.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime1.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  interface PromptButtonCarouselWithImageWidgetProps {
@@ -12,7 +12,7 @@ interface PromptButtonCarouselWithImageWidgetProps {
12
12
  declare const PromptButtonCarouselWithImageWidget: {
13
13
  ({
14
14
  widgetConfigId
15
- }: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime13.JSX.Element;
15
+ }: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime1.JSX.Element;
16
16
  displayName: string;
17
17
  };
18
18
  //#endregion