@envive-ai/react-widgets 0.3.20 → 0.3.22
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/SearchResults/SearchResults.d.cts +2 -2
- package/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/SuggestionBar/SuggestionBar.cjs +5 -6
- package/dist/SuggestionBar/SuggestionBar.d.cts +2 -2
- package/dist/SuggestionBar/SuggestionBar.js +6 -7
- package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +2 -3
- package/dist/SuggestionButtonContainer/SuggestionButtonContainer.js +2 -3
- package/package.json +1 -1
- package/src/SuggestionBar/SuggestionBar.tsx +2 -2
- package/src/SuggestionButtonContainer/SuggestionButtonContainer.tsx +1 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SearchResultsEntryPointWidgetConfig } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { SearchResultsHocProps } from "@envive-ai/react-hooks/hooks/Search";
|
|
4
4
|
|
|
5
5
|
//#region src/SearchResults/SearchResults.d.ts
|
|
6
6
|
interface SearchResultsProps extends SearchResultsHocProps {
|
|
7
7
|
widgetConfig: SearchResultsEntryPointWidgetConfig;
|
|
8
8
|
}
|
|
9
|
-
declare const SearchResults: (props: Omit<SearchResultsProps, string | number | symbol>) =>
|
|
9
|
+
declare const SearchResults: (props: Omit<SearchResultsProps, string | number | symbol>) => react_jsx_runtime0.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SearchResults };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/SearchResults/SearchResultsWidget.d.ts
|
|
4
|
-
declare const SearchResultsWidget: () =>
|
|
4
|
+
declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { SearchResultsWidget };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/SearchResults/SearchResultsWidget.d.ts
|
|
4
|
-
declare const SearchResultsWidget: () =>
|
|
4
|
+
declare const SearchResultsWidget: () => react_jsx_runtime0.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { SearchResultsWidget };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/SearchZeroState/SearchZeroStateWidget.d.ts
|
|
4
4
|
type SearchZeroStateWidgetProps = {
|
|
@@ -10,6 +10,6 @@ declare const SearchZeroStateWidget: ({
|
|
|
10
10
|
initialIsOpen,
|
|
11
11
|
widgetConfigId,
|
|
12
12
|
entryPointRef
|
|
13
|
-
}: SearchZeroStateWidgetProps) =>
|
|
13
|
+
}: SearchZeroStateWidgetProps) => react_jsx_runtime3.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { SearchZeroStateWidget };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_SuggestionButtonContainer = require('../SuggestionButtonContainer/SuggestionButtonContainer.cjs');
|
|
3
|
+
require('../SuggestionButtonContainer/index.cjs');
|
|
2
4
|
const require_index = require('../node_modules/react-indiana-drag-scroll/dist/index.cjs');
|
|
3
5
|
const require_v4 = require('../node_modules/uuid/dist-node/v4.cjs');
|
|
4
6
|
const require_types = require('./types.cjs');
|
|
5
|
-
const require_SuggestionButtonContainer = require('../SuggestionButtonContainer/SuggestionButtonContainer.cjs');
|
|
6
|
-
require('../SuggestionButtonContainer/index.cjs');
|
|
7
7
|
let react = require("react");
|
|
8
8
|
let jotai = require("jotai");
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
-
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
11
|
-
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
12
10
|
let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
|
|
13
11
|
let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
|
|
14
12
|
let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
|
|
13
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
14
|
+
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
15
15
|
|
|
16
16
|
//#region src/SuggestionBar/SuggestionBar.tsx
|
|
17
17
|
var import_dist = require_index.default;
|
|
@@ -21,8 +21,7 @@ function SuggestionBar({ id, locationForMetrics, buttonTexts, buttonVariation, h
|
|
|
21
21
|
const { ref } = (0, import_dist.useScrollContainer)();
|
|
22
22
|
const isSmallScreen = (0, __envive_ai_react_hooks_hooks_IsSmallScreen.useIsSmallScreen)();
|
|
23
23
|
const logPerfMetric = (0, jotai.useSetAtom)(__envive_ai_react_hooks_atoms_chat.logPerfMetricAtom);
|
|
24
|
-
|
|
25
|
-
(0, __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent.useTrackComponentVisibleEvent)(__envive_ai_react_hooks_application_models.SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
|
|
24
|
+
(0, __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent.useTrackComponentVisibleEvent)(componentVisibleTriggerRef, { animated: animationSpeed !== "none" });
|
|
26
25
|
const handleClickSuggestion = (0, react.useCallback)((buttonText) => {
|
|
27
26
|
handleReply({
|
|
28
27
|
id: require_v4.default(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SuggestionBarLocationForMetrics } from "./types.cjs";
|
|
2
|
-
import * as
|
|
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
|
|
|
@@ -29,6 +29,6 @@ declare function SuggestionBar({
|
|
|
29
29
|
buttonBorderRadius,
|
|
30
30
|
handleReply,
|
|
31
31
|
dataTestId
|
|
32
|
-
}: Readonly<SuggestionBarProps>):
|
|
32
|
+
}: Readonly<SuggestionBarProps>): react_jsx_runtime2.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { SuggestionBar };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import v4_default from "../node_modules/uuid/dist/v4.js";
|
|
2
|
-
import { SuggestionBarLocationForMetrics } from "./types.js";
|
|
3
1
|
import { SuggestionButtonContainer } from "../SuggestionButtonContainer/SuggestionButtonContainer.js";
|
|
4
2
|
import "../SuggestionButtonContainer/index.js";
|
|
3
|
+
import v4_default from "../node_modules/uuid/dist/v4.js";
|
|
4
|
+
import { SuggestionBarLocationForMetrics } from "./types.js";
|
|
5
5
|
import { useCallback, useRef } from "react";
|
|
6
6
|
import { useSetAtom } from "jotai";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
import { MessageRole, MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
|
|
9
|
-
import { useScrollContainer } from "react-indiana-drag-scroll";
|
|
10
|
-
import { PerfMetricsEvents, logPerfMetricAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
11
8
|
import { SUGGESTION_BAR_TESTID } from "@envive-ai/react-hooks/config";
|
|
12
9
|
import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
|
|
13
10
|
import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
|
|
11
|
+
import { MessageRole, MessageType } from "@envive-ai/react-hooks/application/models";
|
|
12
|
+
import { useScrollContainer } from "react-indiana-drag-scroll";
|
|
13
|
+
import { PerfMetricsEvents, logPerfMetricAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
14
14
|
|
|
15
15
|
//#region src/SuggestionBar/SuggestionBar.tsx
|
|
16
16
|
function SuggestionBar({ id, locationForMetrics, buttonTexts, buttonVariation, hoverButtonVariation, boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", handleReply, dataTestId }) {
|
|
@@ -19,8 +19,7 @@ function SuggestionBar({ id, locationForMetrics, buttonTexts, buttonVariation, h
|
|
|
19
19
|
const { ref } = useScrollContainer();
|
|
20
20
|
const isSmallScreen = useIsSmallScreen();
|
|
21
21
|
const logPerfMetric = useSetAtom(logPerfMetricAtom);
|
|
22
|
-
|
|
23
|
-
useTrackComponentVisibleEvent(SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
|
|
22
|
+
useTrackComponentVisibleEvent(componentVisibleTriggerRef, { animated: animationSpeed !== "none" });
|
|
24
23
|
const handleClickSuggestion = useCallback((buttonText) => {
|
|
25
24
|
handleReply({
|
|
26
25
|
id: v4_default(),
|
|
@@ -2,11 +2,10 @@ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_useHorizontalScrollAnimation = require('../util/useHorizontalScrollAnimation.cjs');
|
|
3
3
|
let react = require("react");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
-
let
|
|
5
|
+
let __envive_ai_react_toolkit_SuggestionButton = require("@envive-ai/react-toolkit/SuggestionButton");
|
|
6
6
|
let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
|
|
7
7
|
let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
|
|
8
8
|
let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
|
|
9
|
-
let __envive_ai_react_toolkit_SuggestionButton = require("@envive-ai/react-toolkit/SuggestionButton");
|
|
10
9
|
|
|
11
10
|
//#region src/SuggestionButtonContainer/SuggestionButtonContainer.tsx
|
|
12
11
|
function ButtonContainer({ children }) {
|
|
@@ -23,7 +22,7 @@ const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, butt
|
|
|
23
22
|
});
|
|
24
23
|
const isSmallScreen = (0, __envive_ai_react_hooks_hooks_IsSmallScreen.useIsSmallScreen)();
|
|
25
24
|
const isAnimated = animationSpeed !== "none";
|
|
26
|
-
(0, __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent.useTrackComponentVisibleEvent)(
|
|
25
|
+
(0, __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent.useTrackComponentVisibleEvent)(componentVisibleTriggerRef, { animated: isAnimated });
|
|
27
26
|
const visibleButtonsFirstRow = buttonTexts.slice(0, twoRowsOnMobile && isSmallScreen ? Math.ceil((buttonTexts.length + 1) / 2) : void 0);
|
|
28
27
|
const visibleButtonsSecondRow = buttonTexts.slice(Math.ceil((buttonTexts.length + 1) / 2), buttonTexts.length);
|
|
29
28
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useHorizontalScrollAnimation } from "../util/useHorizontalScrollAnimation.js";
|
|
2
2
|
import { useRef } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { SuggestionButton } from "@envive-ai/react-toolkit/SuggestionButton";
|
|
5
5
|
import { SUGGESTION_BAR_BUTTON_TESTID } from "@envive-ai/react-hooks/config";
|
|
6
6
|
import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
|
|
7
7
|
import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
|
|
8
|
-
import { SuggestionButton } from "@envive-ai/react-toolkit/SuggestionButton";
|
|
9
8
|
|
|
10
9
|
//#region src/SuggestionButtonContainer/SuggestionButtonContainer.tsx
|
|
11
10
|
function ButtonContainer({ children }) {
|
|
@@ -22,7 +21,7 @@ const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, butt
|
|
|
22
21
|
});
|
|
23
22
|
const isSmallScreen = useIsSmallScreen();
|
|
24
23
|
const isAnimated = animationSpeed !== "none";
|
|
25
|
-
useTrackComponentVisibleEvent(
|
|
24
|
+
useTrackComponentVisibleEvent(componentVisibleTriggerRef, { animated: isAnimated });
|
|
26
25
|
const visibleButtonsFirstRow = buttonTexts.slice(0, twoRowsOnMobile && isSmallScreen ? Math.ceil((buttonTexts.length + 1) / 2) : void 0);
|
|
27
26
|
const visibleButtonsSecondRow = buttonTexts.slice(Math.ceil((buttonTexts.length + 1) / 2), buttonTexts.length);
|
|
28
27
|
return /* @__PURE__ */ jsxs("div", {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { useScrollContainer } from 'react-indiana-drag-scroll';
|
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
4
|
import { useSetAtom } from 'jotai';
|
|
5
5
|
|
|
6
|
-
import { MessageRole, MessageType
|
|
6
|
+
import { MessageRole, MessageType } from '@envive-ai/react-hooks/application/models';
|
|
7
7
|
import { PerfMetricsEvents, logPerfMetricAtom } from '@envive-ai/react-hooks/atoms/chat';
|
|
8
8
|
import { SUGGESTION_BAR_TESTID } from '@envive-ai/react-hooks/config';
|
|
9
9
|
import { useIsSmallScreen } from '@envive-ai/react-hooks/hooks/IsSmallScreen';
|
|
@@ -55,7 +55,7 @@ function SuggestionBar({
|
|
|
55
55
|
const isAnimated = animationSpeed !== 'none';
|
|
56
56
|
|
|
57
57
|
// Track component visibility
|
|
58
|
-
useTrackComponentVisibleEvent(
|
|
58
|
+
useTrackComponentVisibleEvent(componentVisibleTriggerRef, {
|
|
59
59
|
animated: isAnimated,
|
|
60
60
|
});
|
|
61
61
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable react/no-array-index-key */
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
import { SuggestionButton } from '@envive-ai/react-toolkit/SuggestionButton';
|
|
4
|
-
import { SpiffyWidgets } from '@envive-ai/react-hooks/application/models';
|
|
5
4
|
import { SUGGESTION_BAR_BUTTON_TESTID } from '@envive-ai/react-hooks/config';
|
|
6
5
|
import { useIsSmallScreen } from '@envive-ai/react-hooks/hooks/IsSmallScreen';
|
|
7
6
|
import { useTrackComponentVisibleEvent } from '@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent';
|
|
@@ -46,7 +45,7 @@ const SuggestionButtonContainer: React.FC<SuggestionButtonContainerProps> = ({
|
|
|
46
45
|
const isAnimated = animationSpeed !== 'none';
|
|
47
46
|
|
|
48
47
|
// Track component visibility
|
|
49
|
-
useTrackComponentVisibleEvent(
|
|
48
|
+
useTrackComponentVisibleEvent(componentVisibleTriggerRef, {
|
|
50
49
|
animated: isAnimated,
|
|
51
50
|
});
|
|
52
51
|
|