@envive-ai/react-widgets 0.3.21 → 0.3.23

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.
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/SearchResults/SearchResultsWidget.d.ts
4
- declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
4
+ declare const SearchResultsWidget: () => react_jsx_runtime2.JSX.Element;
5
5
  //#endregion
6
6
  export { SearchResultsWidget };
@@ -1,6 +1,6 @@
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 src/SearchResults/SearchResultsWidget.d.ts
4
- declare const SearchResultsWidget: () => react_jsx_runtime0.JSX.Element;
4
+ declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
5
5
  //#endregion
6
6
  export { SearchResultsWidget };
@@ -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 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) => react_jsx_runtime2.JSX.Element;
13
+ }: SearchZeroStateWidgetProps) => react_jsx_runtime3.JSX.Element;
14
14
  //#endregion
15
15
  export { SearchZeroStateWidget };
@@ -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 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) => react_jsx_runtime2.JSX.Element;
13
+ }: SearchZeroStateWidgetProps) => react_jsx_runtime3.JSX.Element;
14
14
  //#endregion
15
15
  export { SearchZeroStateWidget };
@@ -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
- const isAnimated = animationSpeed !== "none";
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 react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 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>): react_jsx_runtime3.JSX.Element;
32
+ }: Readonly<SuggestionBarProps>): react_jsx_runtime0.JSX.Element;
33
33
  //#endregion
34
34
  export { SuggestionBar };
@@ -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
 
@@ -29,6 +29,6 @@ declare function SuggestionBar({
29
29
  buttonBorderRadius,
30
30
  handleReply,
31
31
  dataTestId
32
- }: Readonly<SuggestionBarProps>): react_jsx_runtime3.JSX.Element;
32
+ }: Readonly<SuggestionBarProps>): react_jsx_runtime2.JSX.Element;
33
33
  //#endregion
34
34
  export { SuggestionBar };
@@ -5,7 +5,7 @@ import "../SuggestionButtonContainer/index.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";
8
+ import { MessageRole, MessageType } from "@envive-ai/react-hooks/application/models";
9
9
  import { useScrollContainer } from "react-indiana-drag-scroll";
10
10
  import { PerfMetricsEvents, logPerfMetricAtom } from "@envive-ai/react-hooks/atoms/chat";
11
11
  import { SUGGESTION_BAR_TESTID } from "@envive-ai/react-hooks/config";
@@ -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
- const isAnimated = animationSpeed !== "none";
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,7 +2,6 @@ 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 __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
6
5
  let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
7
6
  let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
8
7
  let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
@@ -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)(__envive_ai_react_hooks_application_models.SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
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,7 +1,6 @@
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 { 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";
@@ -22,7 +21,7 @@ const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, butt
22
21
  });
23
22
  const isSmallScreen = useIsSmallScreen();
24
23
  const isAnimated = animationSpeed !== "none";
25
- useTrackComponentVisibleEvent(SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, { animated: isAnimated });
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envive-ai/react-widgets",
3
- "version": "0.3.21",
3
+ "version": "0.3.23",
4
4
  "description": "React widget library for Envive services.",
5
5
  "keywords": [
6
6
  "react",
@@ -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, SpiffyWidgets } from '@envive-ai/react-hooks/application/models';
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(SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, {
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(SpiffyWidgets.SuggestionBar, componentVisibleTriggerRef, {
48
+ useTrackComponentVisibleEvent(componentVisibleTriggerRef, {
50
49
  animated: isAnimated,
51
50
  });
52
51