@envive-ai/react-widgets-v3 0.3.9 → 0.3.11
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.
- package/dist/_virtual/rolldown_runtime.cjs +2 -0
- package/dist/debug/GenericSelect.cjs +167 -0
- package/dist/debug/GenericSelect.js +165 -0
- package/dist/debug/MessageContent.cjs +151 -0
- package/dist/debug/MessageContent.js +149 -0
- package/dist/debug/chatEmbed.cjs +95 -0
- package/dist/debug/chatEmbed.js +92 -0
- package/dist/debug/debugBar.cjs +18 -0
- package/dist/debug/debugBar.js +17 -0
- package/dist/debug/reportIssue.cjs +528 -0
- package/dist/debug/reportIssue.js +524 -0
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/CustomerServiceApi.cjs +265 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/DefaultApi.cjs +591 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/InferenceApi.cjs +265 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/ProductsApi.cjs +105 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/SearchApi.cjs +229 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/index.cjs +43 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/index.cjs +39 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationRequest.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationResponse.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddToCartAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsIdentifyRequest.cjs +86 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsTrackEventRequest.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AttachmentRequest.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AutoForm.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Context.cjs +89 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ConversationStatus.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationRequest.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationResponse.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceAttachment.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversation.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversationMessages.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceCustomer.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceMessage.cjs +85 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustomerServiceProvider.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributes.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributesFormCategory.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormSubmittedAttributes.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormType.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FulfillmentDisplayStatus.cjs +84 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GenerationParams.cjs +74 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GetConversationMessagesRequest.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursRequest.cjs +54 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursResponse.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/LabelValue.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ManualForm.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRule.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleAction.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionAttribute.cjs +58 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionType.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleCondition.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleOp.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleStatus.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/NextMessageRequest.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderItemInfo.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderResponseAttributes.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Organization.cjs +83 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfig.cjs +82 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfigResults.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationSettings.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PDPAttributes.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributeCategory.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributes.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributesAttributes.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPIdAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPUrlAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitAttributes.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitCategory.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalRequest.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalResponse.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchFilterResponseAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchRequest.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponse.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseAttributes.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseV2.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/QueryTypedAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportContent.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportSessionRequest.cjs +99 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Response.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseCategory.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseProductAttributes.cjs +91 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchAttributes.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchResponseProduct.cjs +93 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchSuggestionsResponse.cjs +58 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageRequest.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageResponse.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigExperiment.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigFeatureGate.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Suggestion.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionCategory.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionClickedAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventProductCategory.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventRequest.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventResponse.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfo.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfoPrevUserEvent.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingGenericConfig.cjs +52 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPDPConfig.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPLPConfig.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingRequest.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponse.cjs +73 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponseSpecificDetails.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingType.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEvent.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventAttributes.cjs +75 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventCategory.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1GetSessionMessages200Response.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1SearchExplainGet200Response.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetString.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextRequest.cjs +73 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextResponse.cjs +66 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetType.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/index.cjs +221 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/runtime.cjs +324 -0
- package/dist/node_modules/react-icons/fa/index.cjs +65 -0
- package/dist/node_modules/react-icons/fa/index.js +61 -0
- package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
- package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
- package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
- package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
- package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
- package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +27 -0
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +25 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
- package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
- package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +1 -1
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +2 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +2 -0
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.cjs +4 -1
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +5 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.cjs +31 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +15 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +15 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +30 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.cjs +3 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.d.cts +2 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.d.ts +2 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.js +3 -0
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +2 -1
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +2 -1
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +2 -1
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +2 -1
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +26 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +27 -3
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +1 -1
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +1 -1
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +4 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +4 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +2 -1
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +2 -1
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +1 -1
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +1 -1
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +2 -1
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +2 -1
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/widgets-v2/SearchResults/index.d.ts +3 -3
- package/dist/widgets-v2/SearchZeroState/index.d.ts +4 -4
- package/dist/widgets-v2/SuggestionBar/index.d.ts +3 -3
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -2
- package/package.json +5 -1
- package/src/debug/GenericSelect.tsx +236 -0
- package/src/debug/MessageContent.tsx +248 -0
- package/src/debug/chatEmbed.tsx +119 -0
- package/src/debug/debugBar.tsx +13 -0
- package/src/debug/reportIssue.tsx +649 -0
- package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +6 -0
- package/src/stories/FullPageSalesAgentWidget.stories.tsx +68 -0
- package/src/stories/SalesAgentTest/SalesAgentTest.tsx +10 -2
- package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +2 -0
- package/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.ts +11 -5
- package/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.tsx +46 -0
- package/src/widgets/FullPageSalesAgentWidget/index.ts +1 -0
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +5 -1
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +6 -1
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +31 -2
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +10 -2
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +5 -1
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +5 -1
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResults.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroState.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/SuggestionBar.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/config/BaseWidgetConfig.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/config/WidgetType.d.ts +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_MessageContent = require('./MessageContent.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let jotai = require("jotai");
|
|
7
|
+
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
8
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
9
|
+
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
10
|
+
let classnames = require("classnames");
|
|
11
|
+
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
12
|
+
|
|
13
|
+
//#region src/debug/chatEmbed.tsx
|
|
14
|
+
const containerClassNames = (0, classnames.default)({
|
|
15
|
+
"envive-tw-font-sans": true,
|
|
16
|
+
"envive-tw-text-base": true,
|
|
17
|
+
"envive-tw-leading-6": true,
|
|
18
|
+
"envive-tw-font-normal": true
|
|
19
|
+
});
|
|
20
|
+
const messagesContainerClassNames = (0, classnames.default)({
|
|
21
|
+
"envive-tw-flex": true,
|
|
22
|
+
"envive-tw-flex-col": true,
|
|
23
|
+
"envive-tw-gap-4": true
|
|
24
|
+
});
|
|
25
|
+
const turnContainerClassNames = (0, classnames.default)({
|
|
26
|
+
"envive-tw-flex": true,
|
|
27
|
+
"envive-tw-flex-col": true,
|
|
28
|
+
"envive-tw-gap-2": true
|
|
29
|
+
});
|
|
30
|
+
const messageBodyClassNames = (0, classnames.default)({ "envive-tw-whitespace-pre-wrap": true });
|
|
31
|
+
const lastTurnClassNames = (0, classnames.default)({
|
|
32
|
+
"envive-tw-bg-[#FFFFF0]": true,
|
|
33
|
+
"envive-tw-p-2": true,
|
|
34
|
+
"envive-tw-rounded-lg": true
|
|
35
|
+
});
|
|
36
|
+
const lastTurnContentClassNames = (0, classnames.default)({
|
|
37
|
+
"envive-tw-flex": true,
|
|
38
|
+
"envive-tw-flex-col": true,
|
|
39
|
+
"envive-tw-gap-2": true
|
|
40
|
+
});
|
|
41
|
+
const ChatEmbed = () => {
|
|
42
|
+
const { messages, suggestions } = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_chat.chatAtom);
|
|
43
|
+
const lastTurnRef = react.default.useRef(null);
|
|
44
|
+
react.default.useEffect(() => {
|
|
45
|
+
if (lastTurnRef.current && messages.length > 0) lastTurnRef.current.scrollIntoView({
|
|
46
|
+
behavior: "smooth",
|
|
47
|
+
block: "nearest"
|
|
48
|
+
});
|
|
49
|
+
}, [messages]);
|
|
50
|
+
const answerSuggestions = suggestions.filter((s) => s.isAnswer);
|
|
51
|
+
const generalSuggestions = suggestions.filter((s) => !s.isAnswer);
|
|
52
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
53
|
+
className: containerClassNames,
|
|
54
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
55
|
+
className: messagesContainerClassNames,
|
|
56
|
+
children: messages.map((turn, turnIdx) => {
|
|
57
|
+
const isLastTurn = turnIdx === messages.length - 1;
|
|
58
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
59
|
+
className: turnContainerClassNames,
|
|
60
|
+
children: turn.filter((m) => m.type === __envive_ai_react_hooks_application_models.MessageType.Separator).map((message) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
61
|
+
className: messageBodyClassNames,
|
|
62
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MessageContent.MessageContent, { message })
|
|
63
|
+
}) }, message.id))
|
|
64
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
65
|
+
ref: isLastTurn ? lastTurnRef : null,
|
|
66
|
+
className: `${turnContainerClassNames} ${isLastTurn ? lastTurnClassNames : ""}`,
|
|
67
|
+
children: turn.filter((m) => m.type !== __envive_ai_react_hooks_application_models.MessageType.Separator).map((message) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
68
|
+
className: messageBodyClassNames,
|
|
69
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_MessageContent.MessageContent, { message })
|
|
70
|
+
}) }, message.id))
|
|
71
|
+
})] }, turnIdx);
|
|
72
|
+
})
|
|
73
|
+
}), suggestions.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
74
|
+
className: lastTurnClassNames,
|
|
75
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
76
|
+
className: lastTurnContentClassNames,
|
|
77
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_PromptCarousel.PromptCarousel, {
|
|
78
|
+
promptButtonTexts: answerSuggestions.map((s) => s.content),
|
|
79
|
+
handleButtonClick: () => {},
|
|
80
|
+
promptCarouselRows: __envive_ai_react_toolkit_v3_PromptCarousel.PromptCarouselRows.ALWAYS_ONE,
|
|
81
|
+
isLoading: false
|
|
82
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_PromptCarousel.PromptCarousel, {
|
|
83
|
+
promptButtonTexts: generalSuggestions.map((s) => s.content),
|
|
84
|
+
handleButtonClick: () => {},
|
|
85
|
+
promptCarouselRows: __envive_ai_react_toolkit_v3_PromptCarousel.PromptCarouselRows.ALWAYS_ONE,
|
|
86
|
+
isLoading: false
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
var chatEmbed_default = ChatEmbed;
|
|
93
|
+
|
|
94
|
+
//#endregion
|
|
95
|
+
exports.default = chatEmbed_default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { MessageContent } from "./MessageContent.js";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useAtomValue } from "jotai";
|
|
5
|
+
import { chatAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
6
|
+
import { MessageType } from "@envive-ai/react-hooks/application/models";
|
|
7
|
+
import { PromptCarousel, PromptCarouselRows } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
8
|
+
import classNames from "classnames";
|
|
9
|
+
|
|
10
|
+
//#region src/debug/chatEmbed.tsx
|
|
11
|
+
const containerClassNames = classNames({
|
|
12
|
+
"envive-tw-font-sans": true,
|
|
13
|
+
"envive-tw-text-base": true,
|
|
14
|
+
"envive-tw-leading-6": true,
|
|
15
|
+
"envive-tw-font-normal": true
|
|
16
|
+
});
|
|
17
|
+
const messagesContainerClassNames = classNames({
|
|
18
|
+
"envive-tw-flex": true,
|
|
19
|
+
"envive-tw-flex-col": true,
|
|
20
|
+
"envive-tw-gap-4": true
|
|
21
|
+
});
|
|
22
|
+
const turnContainerClassNames = classNames({
|
|
23
|
+
"envive-tw-flex": true,
|
|
24
|
+
"envive-tw-flex-col": true,
|
|
25
|
+
"envive-tw-gap-2": true
|
|
26
|
+
});
|
|
27
|
+
const messageBodyClassNames = classNames({ "envive-tw-whitespace-pre-wrap": true });
|
|
28
|
+
const lastTurnClassNames = classNames({
|
|
29
|
+
"envive-tw-bg-[#FFFFF0]": true,
|
|
30
|
+
"envive-tw-p-2": true,
|
|
31
|
+
"envive-tw-rounded-lg": true
|
|
32
|
+
});
|
|
33
|
+
const lastTurnContentClassNames = classNames({
|
|
34
|
+
"envive-tw-flex": true,
|
|
35
|
+
"envive-tw-flex-col": true,
|
|
36
|
+
"envive-tw-gap-2": true
|
|
37
|
+
});
|
|
38
|
+
const ChatEmbed = () => {
|
|
39
|
+
const { messages, suggestions } = useAtomValue(chatAtom);
|
|
40
|
+
const lastTurnRef = React.useRef(null);
|
|
41
|
+
React.useEffect(() => {
|
|
42
|
+
if (lastTurnRef.current && messages.length > 0) lastTurnRef.current.scrollIntoView({
|
|
43
|
+
behavior: "smooth",
|
|
44
|
+
block: "nearest"
|
|
45
|
+
});
|
|
46
|
+
}, [messages]);
|
|
47
|
+
const answerSuggestions = suggestions.filter((s) => s.isAnswer);
|
|
48
|
+
const generalSuggestions = suggestions.filter((s) => !s.isAnswer);
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: containerClassNames,
|
|
51
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
52
|
+
className: messagesContainerClassNames,
|
|
53
|
+
children: messages.map((turn, turnIdx) => {
|
|
54
|
+
const isLastTurn = turnIdx === messages.length - 1;
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: turnContainerClassNames,
|
|
57
|
+
children: turn.filter((m) => m.type === MessageType.Separator).map((message) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", {
|
|
58
|
+
className: messageBodyClassNames,
|
|
59
|
+
children: /* @__PURE__ */ jsx(MessageContent, { message })
|
|
60
|
+
}) }, message.id))
|
|
61
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
62
|
+
ref: isLastTurn ? lastTurnRef : null,
|
|
63
|
+
className: `${turnContainerClassNames} ${isLastTurn ? lastTurnClassNames : ""}`,
|
|
64
|
+
children: turn.filter((m) => m.type !== MessageType.Separator).map((message) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: messageBodyClassNames,
|
|
66
|
+
children: /* @__PURE__ */ jsx(MessageContent, { message })
|
|
67
|
+
}) }, message.id))
|
|
68
|
+
})] }, turnIdx);
|
|
69
|
+
})
|
|
70
|
+
}), suggestions.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
71
|
+
className: lastTurnClassNames,
|
|
72
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
73
|
+
className: lastTurnContentClassNames,
|
|
74
|
+
children: [/* @__PURE__ */ jsx(PromptCarousel, {
|
|
75
|
+
promptButtonTexts: answerSuggestions.map((s) => s.content),
|
|
76
|
+
handleButtonClick: () => {},
|
|
77
|
+
promptCarouselRows: PromptCarouselRows.ALWAYS_ONE,
|
|
78
|
+
isLoading: false
|
|
79
|
+
}), /* @__PURE__ */ jsx(PromptCarousel, {
|
|
80
|
+
promptButtonTexts: generalSuggestions.map((s) => s.content),
|
|
81
|
+
handleButtonClick: () => {},
|
|
82
|
+
promptCarouselRows: PromptCarouselRows.ALWAYS_ONE,
|
|
83
|
+
isLoading: false
|
|
84
|
+
})]
|
|
85
|
+
})
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
var chatEmbed_default = ChatEmbed;
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
export { chatEmbed_default as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_reportIssue = require('./reportIssue.cjs');
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let __envive_ai_react_hooks_hooks_SystemSettingsContext = require("@envive-ai/react-hooks/hooks/SystemSettingsContext");
|
|
5
|
+
|
|
6
|
+
//#region src/debug/debugBar.tsx
|
|
7
|
+
const DebugBar = () => {
|
|
8
|
+
const { showDebugBar } = (0, __envive_ai_react_hooks_hooks_SystemSettingsContext.useSystemSettingsContext)();
|
|
9
|
+
console.log("=== showDebugBar ===", showDebugBar);
|
|
10
|
+
if (!showDebugBar) return null;
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
12
|
+
className: "envive-tw-flex envive-tw-items-center envive-tw-p-[4px]",
|
|
13
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_reportIssue.ReportIssue, {})
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.DebugBar = DebugBar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReportIssue } from "./reportIssue.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useSystemSettingsContext } from "@envive-ai/react-hooks/hooks/SystemSettingsContext";
|
|
4
|
+
|
|
5
|
+
//#region src/debug/debugBar.tsx
|
|
6
|
+
const DebugBar = () => {
|
|
7
|
+
const { showDebugBar } = useSystemSettingsContext();
|
|
8
|
+
console.log("=== showDebugBar ===", showDebugBar);
|
|
9
|
+
if (!showDebugBar) return null;
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: "envive-tw-flex envive-tw-items-center envive-tw-p-[4px]",
|
|
12
|
+
children: /* @__PURE__ */ jsx(ReportIssue, {})
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { DebugBar };
|