@envive-ai/react-widgets 0.3.2 → 0.3.5

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 (83) hide show
  1. package/dist/SearchResults/SearchResults.d.cts +2 -2
  2. package/dist/SearchResults/SearchResults.d.ts +3 -2
  3. package/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
  4. package/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
  5. package/dist/SearchZeroState/SearchZeroState.cjs +1 -1
  6. package/dist/SearchZeroState/SearchZeroState.js +1 -1
  7. package/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
  8. package/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
  9. package/dist/SearchZeroState/components/RecommendedProducts.cjs +1 -1
  10. package/dist/SearchZeroState/components/RecommendedProducts.js +1 -1
  11. package/dist/SearchZeroState/index.d.cts +2 -1
  12. package/dist/SearchZeroState/index.d.ts +2 -1
  13. package/dist/SearchZeroState/types.d.cts +2 -2
  14. package/dist/SearchZeroState/types.d.ts +2 -2
  15. package/dist/SuggestionBar/SuggestionBar.cjs +3 -3
  16. package/dist/SuggestionBar/SuggestionBar.d.cts +3 -3
  17. package/dist/SuggestionBar/SuggestionBar.d.ts +3 -3
  18. package/dist/SuggestionBar/SuggestionBar.js +4 -4
  19. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.cjs +2 -2
  20. package/dist/SuggestionButtonContainer/SuggestionButtonContainer.js +2 -2
  21. package/dist/SuggestionButtonContainer/types.d.cts +3 -2
  22. package/dist/SuggestionButtonContainer/types.d.ts +3 -2
  23. package/dist/hooks/dist/application/models/api/response.d.cts +11 -0
  24. package/dist/hooks/dist/application/models/api/search.d.cts +13 -0
  25. package/dist/hooks/dist/application/models/chatElementDisplayLocation.d.cts +27 -0
  26. package/dist/hooks/dist/application/models/featureGates.d.cts +30 -0
  27. package/dist/hooks/dist/application/models/frontendConfig.d.cts +17 -0
  28. package/dist/hooks/dist/application/models/utilityTypes/camelCase.d.cts +71 -0
  29. package/dist/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +58 -0
  30. package/dist/hooks/dist/application/models/utilityTypes/internal.d.cts +22 -0
  31. package/dist/hooks/dist/application/models/utilityTypes/splitWords.d.cts +31 -0
  32. package/dist/hooks/dist/application/models/utilityTypes/trim.d.cts +30 -0
  33. package/dist/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +30 -0
  34. package/dist/hooks/dist/application/models/variantInfo/pageVisitInfo.d.cts +11 -0
  35. package/dist/hooks/dist/application/models/variantInfo/plpInfo.d.cts +8 -0
  36. package/dist/hooks/dist/application/models/variantInfo/productInfo.d.cts +10 -0
  37. package/dist/hooks/dist/application/models/variantInfo/variantInfo.d.cts +31 -0
  38. package/dist/hooks/dist/application/utils/overrides.d.cts +22 -0
  39. package/dist/hooks/dist/atoms/search/searchAPI.d.cts +11 -0
  40. package/dist/hooks/dist/contexts/types.d.cts +671 -0
  41. package/dist/hooks/dist/hooks/Search/useSearch.d.cts +57 -0
  42. package/dist/hooks/dist/hooks/utils.d.cts +9 -0
  43. package/dist/hooks/dist/merchants/domInsertion.d.cts +15 -0
  44. package/dist/hooks/dist/merchants/gridInsertion.d.cts +22 -0
  45. package/dist/hooks/dist/types/customerService.d.cts +24 -0
  46. package/dist/hooks/dist/types/custservice-types.d.cts +10 -0
  47. package/dist/hooks/dist/types/enviveConfig.d.cts +30 -0
  48. package/dist/hooks/dist/types/index.d.cts +6 -0
  49. package/dist/hooks/dist/types/search-filter-types.d.cts +26 -0
  50. package/dist/hooks/dist/types/suggestionBarV2-types.d.cts +9 -0
  51. package/dist/hooks/dist/types/test-types.d.cts +8 -0
  52. package/dist/packages/hooks/dist/application/models/api/response.d.ts +11 -0
  53. package/dist/packages/hooks/dist/application/models/api/search.d.ts +13 -0
  54. package/dist/packages/hooks/dist/application/models/chatElementDisplayLocation.d.ts +27 -0
  55. package/dist/packages/hooks/dist/application/models/featureGates.d.ts +30 -0
  56. package/dist/packages/hooks/dist/application/models/frontendConfig.d.ts +17 -0
  57. package/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +71 -0
  58. package/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +58 -0
  59. package/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +22 -0
  60. package/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +31 -0
  61. package/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +30 -0
  62. package/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +30 -0
  63. package/dist/packages/hooks/dist/application/models/variantInfo/pageVisitInfo.d.ts +11 -0
  64. package/dist/packages/hooks/dist/application/models/variantInfo/plpInfo.d.ts +8 -0
  65. package/dist/packages/hooks/dist/application/models/variantInfo/productInfo.d.ts +10 -0
  66. package/dist/packages/hooks/dist/application/models/variantInfo/variantInfo.d.ts +31 -0
  67. package/dist/packages/hooks/dist/application/utils/overrides.d.ts +22 -0
  68. package/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +13 -0
  69. package/dist/packages/hooks/dist/contexts/types.d.ts +671 -0
  70. package/dist/packages/hooks/dist/hooks/Search/index.d.ts +1 -0
  71. package/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +57 -0
  72. package/dist/packages/hooks/dist/hooks/utils.d.ts +9 -0
  73. package/dist/packages/hooks/dist/merchants/domInsertion.d.ts +15 -0
  74. package/dist/packages/hooks/dist/merchants/gridInsertion.d.ts +22 -0
  75. package/dist/packages/hooks/dist/types/customerService.d.ts +24 -0
  76. package/dist/packages/hooks/dist/types/custservice-types.d.ts +10 -0
  77. package/dist/packages/hooks/dist/types/enviveConfig.d.ts +30 -0
  78. package/dist/packages/hooks/dist/types/index.d.ts +5 -0
  79. package/dist/packages/hooks/dist/types/search-filter-types.d.ts +26 -0
  80. package/dist/packages/hooks/dist/types/suggestionBarV2-types.d.ts +9 -0
  81. package/dist/packages/hooks/dist/types/test-types.d.ts +8 -0
  82. package/package.json +1 -1
  83. package/src/SuggestionButtonContainer/SuggestionButtonContainer.tsx +1 -1
@@ -1,11 +1,11 @@
1
+ import { SearchResultsHocProps } from "../hooks/dist/hooks/Search/useSearch.cjs";
1
2
  import { SearchResultsEntryPointWidgetConfig } from "./types.cjs";
2
3
  import * as react_jsx_runtime0 from "react/jsx-runtime";
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>) => react_jsx_runtime0.JSX.Element;
9
+ declare const SearchResults: (props: Omit<SearchResultsProps, keyof SearchResultsHocProps>) => react_jsx_runtime0.JSX.Element;
10
10
  //#endregion
11
11
  export { SearchResults };
@@ -1,11 +1,12 @@
1
+ import { SearchResultsHocProps } from "../packages/hooks/dist/hooks/Search/useSearch.js";
2
+ import "../packages/hooks/dist/hooks/Search/index.js";
1
3
  import { SearchResultsEntryPointWidgetConfig } from "./types.js";
2
- import { SearchResultsHocProps } from "@envive-ai/react-hooks/hooks/Search";
3
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
4
5
 
5
6
  //#region src/SearchResults/SearchResults.d.ts
6
7
  interface SearchResultsProps extends SearchResultsHocProps {
7
8
  widgetConfig: SearchResultsEntryPointWidgetConfig;
8
9
  }
9
- declare const SearchResults: (props: Omit<SearchResultsProps, string | number | symbol>) => react_jsx_runtime0.JSX.Element;
10
+ declare const SearchResults: (props: Omit<SearchResultsProps, keyof SearchResultsHocProps>) => react_jsx_runtime0.JSX.Element;
10
11
  //#endregion
11
12
  export { SearchResults };
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime2 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_runtime2.JSX.Element;
4
+ declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
5
5
  //#endregion
6
6
  export { SearchResultsWidget };
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 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_runtime0.JSX.Element;
5
5
  //#endregion
6
6
  export { SearchResultsWidget };
@@ -11,10 +11,10 @@ let react = require("react");
11
11
  react = require_rolldown_runtime.__toESM(react);
12
12
  let __envive_ai_react_hooks_hooks_Search = require("@envive-ai/react-hooks/hooks/Search");
13
13
  let react_jsx_runtime = require("react/jsx-runtime");
14
- let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
15
14
  let framer_motion = require("framer-motion");
16
15
  let __envive_ai_react_hooks_hooks_AmplitudeOperations = require("@envive-ai/react-hooks/hooks/AmplitudeOperations");
17
16
  let __envive_ai_react_hooks_types = require("@envive-ai/react-hooks/types");
17
+ let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
18
18
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
19
19
  let __envive_ai_react_toolkit_SearchInputForm = require("@envive-ai/react-toolkit/SearchInputForm");
20
20
  let __envive_ai_react_toolkit_SearchInput = require("@envive-ai/react-toolkit/SearchInput");
@@ -9,10 +9,10 @@ import { RecommendedProducts } from "./components/RecommendedProducts.js";
9
9
  import React, { useCallback, useEffect, useRef, useState } from "react";
10
10
  import { useSearch } from "@envive-ai/react-hooks/hooks/Search";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
- import { MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
13
12
  import { AnimatePresence, motion } from "framer-motion";
14
13
  import { useAmplitudeTracking } from "@envive-ai/react-hooks/hooks/AmplitudeOperations";
15
14
  import { SuggestionBarLocationForMetrics } from "@envive-ai/react-hooks/types";
15
+ import { MessageType, SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
16
16
  import { SpiffyMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
17
17
  import { SearchInputForm } from "@envive-ai/react-toolkit/SearchInputForm";
18
18
  import { SearchInput, searchInputVariantClasses } from "@envive-ai/react-toolkit/SearchInput";
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 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_runtime0.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 };
@@ -2,9 +2,9 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
2
  let classnames = require("classnames");
3
3
  classnames = require_rolldown_runtime.__toESM(classnames);
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 framer_motion = require("framer-motion");
7
6
  let __envive_ai_react_hooks_hooks_AmplitudeOperations = require("@envive-ai/react-hooks/hooks/AmplitudeOperations");
7
+ let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
8
8
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
9
9
  let __envive_ai_react_toolkit_Typography = require("@envive-ai/react-toolkit/Typography");
10
10
  let __envive_ai_react_toolkit_ProductGrid = require("@envive-ai/react-toolkit/ProductGrid");
@@ -1,8 +1,8 @@
1
1
  import classNames from "classnames";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { ChatElementDisplayLocation } from "@envive-ai/react-hooks/application/models";
4
3
  import { motion } from "framer-motion";
5
4
  import { useAmplitudeTracking } from "@envive-ai/react-hooks/hooks/AmplitudeOperations";
5
+ import { ChatElementDisplayLocation } from "@envive-ai/react-hooks/application/models";
6
6
  import { SpiffyMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
7
7
  import { Typography } from "@envive-ai/react-toolkit/Typography";
8
8
  import { ProductGrid } from "@envive-ai/react-toolkit/ProductGrid";
@@ -1,4 +1,5 @@
1
- import { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroStateProps } from "./types.cjs";
1
+ import { SearchEntryPointWidgetConfig, SearchInputVariant } from "../hooks/dist/contexts/types.cjs";
2
+ import { SearchZeroStateProps } from "./types.cjs";
2
3
  import { SearchZeroState } from "./SearchZeroState.cjs";
3
4
  import { SearchZeroStateWidget } from "./SearchZeroStateWidget.cjs";
4
5
  export { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroState, SearchZeroStateProps, SearchZeroStateWidget };
@@ -1,4 +1,5 @@
1
- import { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroStateProps } from "./types.js";
1
+ import { SearchEntryPointWidgetConfig, SearchInputVariant } from "../packages/hooks/dist/contexts/types.js";
2
+ import { SearchZeroStateProps } from "./types.js";
2
3
  import { SearchZeroState } from "./SearchZeroState.js";
3
4
  import { SearchZeroStateWidget } from "./SearchZeroStateWidget.js";
4
5
  export { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroState, SearchZeroStateProps, SearchZeroStateWidget };
@@ -1,4 +1,4 @@
1
- import { SearchEntryPointWidgetConfig, SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
1
+ import { SearchEntryPointWidgetConfig, SearchInputVariant } from "../hooks/dist/contexts/types.cjs";
2
2
 
3
3
  //#region src/SearchZeroState/types.d.ts
4
4
  interface SearchZeroStateProps {
@@ -7,4 +7,4 @@ interface SearchZeroStateProps {
7
7
  entryPointRef?: React.Ref<HTMLButtonElement>;
8
8
  }
9
9
  //#endregion
10
- export { type SearchEntryPointWidgetConfig, type SearchInputVariant, SearchZeroStateProps };
10
+ export { SearchZeroStateProps };
@@ -1,4 +1,4 @@
1
- import { SearchEntryPointWidgetConfig, SearchInputVariant } from "@envive-ai/react-hooks/contexts/types";
1
+ import { SearchEntryPointWidgetConfig, SearchInputVariant } from "../packages/hooks/dist/contexts/types.js";
2
2
 
3
3
  //#region src/SearchZeroState/types.d.ts
4
4
  interface SearchZeroStateProps {
@@ -7,4 +7,4 @@ interface SearchZeroStateProps {
7
7
  entryPointRef?: React.Ref<HTMLButtonElement>;
8
8
  }
9
9
  //#endregion
10
- export { type SearchEntryPointWidgetConfig, type SearchInputVariant, SearchZeroStateProps };
10
+ export { SearchZeroStateProps };
@@ -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');
4
2
  const require_index = require('../node_modules/react-indiana-drag-scroll/dist/index.cjs');
5
3
  const require_v4 = require('../node_modules/uuid/dist-node/v4.cjs');
6
4
  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
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");
11
12
  let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
12
13
  let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
13
14
  let __envive_ai_react_hooks_hooks_TrackComponentVisibleEvent = require("@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent");
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;
@@ -1,6 +1,6 @@
1
+ import { SuggestionButtonVariant } from "../hooks/dist/contexts/types.cjs";
1
2
  import { SuggestionBarLocationForMetrics } from "./types.cjs";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
3
- import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
3
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
4
4
  import { Message } from "postcss";
5
5
 
6
6
  //#region src/SuggestionBar/SuggestionBar.d.ts
@@ -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 };
@@ -1,6 +1,6 @@
1
+ import { SuggestionButtonVariant } from "../packages/hooks/dist/contexts/types.js";
1
2
  import { SuggestionBarLocationForMetrics } from "./types.js";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
3
- import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
3
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
4
4
  import { Message } from "postcss";
5
5
 
6
6
  //#region src/SuggestionBar/SuggestionBar.d.ts
@@ -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 };
@@ -1,16 +1,16 @@
1
- import { SuggestionButtonContainer } from "../SuggestionButtonContainer/SuggestionButtonContainer.js";
2
- import "../SuggestionButtonContainer/index.js";
3
1
  import v4_default from "../node_modules/uuid/dist/v4.js";
4
2
  import { SuggestionBarLocationForMetrics } from "./types.js";
3
+ import { SuggestionButtonContainer } from "../SuggestionButtonContainer/SuggestionButtonContainer.js";
4
+ 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
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";
9
11
  import { SUGGESTION_BAR_TESTID } from "@envive-ai/react-hooks/config";
10
12
  import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
11
13
  import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
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 }) {
@@ -2,11 +2,11 @@ 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_toolkit_SuggestionButton = require("@envive-ai/react-toolkit/SuggestionButton");
6
5
  let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
7
6
  let __envive_ai_react_hooks_config = require("@envive-ai/react-hooks/config");
8
7
  let __envive_ai_react_hooks_hooks_IsSmallScreen = require("@envive-ai/react-hooks/hooks/IsSmallScreen");
9
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
10
 
11
11
  //#region src/SuggestionButtonContainer/SuggestionButtonContainer.tsx
12
12
  function ButtonContainer({ children }) {
@@ -15,7 +15,7 @@ function ButtonContainer({ children }) {
15
15
  children
16
16
  });
17
17
  }
18
- const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, buttonTexts, boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", scrollContainerRef, onButtonClick }) => {
18
+ const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, buttonTexts = [], boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", scrollContainerRef, onButtonClick }) => {
19
19
  const componentVisibleTriggerRef = (0, react.useRef)(null);
20
20
  require_useHorizontalScrollAnimation.useHorizontalScrollAnimation({
21
21
  scrollContainerRef,
@@ -1,11 +1,11 @@
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 { SuggestionButton } from "@envive-ai/react-toolkit/SuggestionButton";
5
4
  import { SpiffyWidgets } from "@envive-ai/react-hooks/application/models";
6
5
  import { SUGGESTION_BAR_BUTTON_TESTID } from "@envive-ai/react-hooks/config";
7
6
  import { useIsSmallScreen } from "@envive-ai/react-hooks/hooks/IsSmallScreen";
8
7
  import { useTrackComponentVisibleEvent } from "@envive-ai/react-hooks/hooks/TrackComponentVisibleEvent";
8
+ import { SuggestionButton } from "@envive-ai/react-toolkit/SuggestionButton";
9
9
 
10
10
  //#region src/SuggestionButtonContainer/SuggestionButtonContainer.tsx
11
11
  function ButtonContainer({ children }) {
@@ -14,7 +14,7 @@ function ButtonContainer({ children }) {
14
14
  children
15
15
  });
16
16
  }
17
- const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, buttonTexts, boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", scrollContainerRef, onButtonClick }) => {
17
+ const SuggestionButtonContainer = ({ buttonVariation, hoverButtonVariation, buttonTexts = [], boldFirstButton = false, twoRowsOnMobile = false, animationSpeed = "none", buttonBorderRadius = "lg", scrollContainerRef, onButtonClick }) => {
18
18
  const componentVisibleTriggerRef = useRef(null);
19
19
  useHorizontalScrollAnimation({
20
20
  scrollContainerRef,
@@ -1,5 +1,6 @@
1
- import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
2
- import { TestProps } from "@envive-ai/react-hooks/types";
1
+ import { TestProps } from "../hooks/dist/types/test-types.cjs";
2
+ import { SuggestionButtonVariant } from "../hooks/dist/contexts/types.cjs";
3
+ import "../hooks/dist/types/index.cjs";
3
4
 
4
5
  //#region src/SuggestionButtonContainer/types.d.ts
5
6
  interface SuggestionButtonContainerProps extends TestProps {
@@ -1,5 +1,6 @@
1
- import { TestProps } from "@envive-ai/react-hooks/types";
2
- import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
1
+ import { TestProps } from "../packages/hooks/dist/types/test-types.js";
2
+ import { SuggestionButtonVariant } from "../packages/hooks/dist/contexts/types.js";
3
+ import "../packages/hooks/dist/types/index.js";
3
4
 
4
5
  //#region src/SuggestionButtonContainer/types.d.ts
5
6
  interface SuggestionButtonContainerProps extends TestProps {
@@ -0,0 +1,11 @@
1
+ import { CamelCasedPropertiesDeep } from "../utilityTypes/camelCasedPropertiesDeep.cjs";
2
+ import { ResponseCategory, SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
3
+
4
+ //#region ../hooks/dist/application/models/api/response.d.ts
5
+
6
+ interface SearchResponseProductAttributes {
7
+ category: ResponseCategory.Product;
8
+ attributes: CamelCasedPropertiesDeep<SearchResponseProduct>;
9
+ }
10
+ //#endregion
11
+ export { SearchResponseProductAttributes };
@@ -0,0 +1,13 @@
1
+ import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
2
+
3
+ //#region ../hooks/dist/application/models/api/search.d.ts
4
+
5
+ interface SearchResult {
6
+ products: SearchResponseProduct[];
7
+ filters: string[];
8
+ generatedQuery?: string;
9
+ totalProductCount: number;
10
+ searchResponseId: string;
11
+ }
12
+ //#endregion
13
+ export { SearchResult };
@@ -0,0 +1,27 @@
1
+ //#region ../hooks/dist/application/models/chatElementDisplayLocation.d.ts
2
+ //#region src/application/models/chatElementDisplayLocation.d.ts
3
+ declare enum ChatElementDisplayLocation {
4
+ IN_CHAT = "in_chat",
5
+ CHAT_PREVIEW = "chat_preview",
6
+ FLOATING_BUTTON = "floating_button",
7
+ HELP_ME_CHOOSE = "help_me_choose",
8
+ PLP_IMAGE_BANNER = "plp_image_banner",
9
+ TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
10
+ BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
11
+ BLOCK_BACK_BUTTON = "block_back_button",
12
+ SWITCH_TO_AGENT = "switch_to_agent",
13
+ CONVERSATIONAL_SEARCH = "conversational_search",
14
+ GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
15
+ SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
16
+ SEARCH_PROMPT = "search_prompt",
17
+ SEARCH_ZERO_STATE_SUGGESTED_PRODUCTS = "search_zero_state_suggested_products",
18
+ SEARCH_PROMPT_BUTTON = "search_prompt_button",
19
+ PRODUCT_GRID = "product_grid",
20
+ UNSPECIFIED = "unspecified",
21
+ FILTER_MODAL = "filter_modal",
22
+ PROMPT_CARD = "prompt_card",
23
+ WINDOW_API_CALL = "window_api_call",
24
+ }
25
+ //#endregion
26
+ //#endregion
27
+ export { ChatElementDisplayLocation };
@@ -0,0 +1,30 @@
1
+ //#region ../hooks/dist/application/models/featureGates.d.ts
2
+ //#region src/application/models/featureGates.d.ts
3
+ declare enum FeatureGates {
4
+ IsClientSessionEnabled = "is_client_session_enabled",
5
+ IsSalesAgentEnabled = "is_sales_agent_enabled",
6
+ IsNewFeatureEnabled = "is_new_feature_enabled",
7
+ IsFineTunedModel8b = "is_fine_tuned_model_8b",
8
+ IsImageBannerEnabled = "is_image_banner_enabled",
9
+ IsOrderLookupEnabled = "is_order_lookup_enabled",
10
+ IsSummarizeReviewsEnabled = "is_summarize_reviews_enabled",
11
+ IsGlobalSearchEnabled = "is_global_search_enabled",
12
+ IsImagePromptEnabled = "is_image_prompt_enabled",
13
+ IsWatermarkEnabled = "is_watermark_enabled",
14
+ IsInferenceRegion0 = "is_inference_region_0",
15
+ IsChatVariantEnabled = "is_chat_variant_enabled",
16
+ IsChatVariantAEnabled = "is_chat_variant_a_enabled",
17
+ IsChatVariantBEnabled = "is_chat_variant_b_enabled",
18
+ IsUserQueryAlwaysEnabled = "is_user_query_always_enabled",
19
+ IsSearchAutocompleteEnabled = "is_search_autocomplete_enabled",
20
+ IsEmptyDivPLPEnabled = "is_empty_div_plp_enabled",
21
+ IsRecommendedProductsEnabled = "is_recommended_products_enabled",
22
+ IsChatScrollPaused = "is_chat_scroll_paused",
23
+ IsSessionInSearchRerankerTest = "is_session_in_search_reranker_test",
24
+ IsReferrerBasedPromptEnabled = "is_referrer_based_prompt_enabled",
25
+ IsInModelExperiment = "is_in_model_experiment",
26
+ IsModelExperimentTreatment = "is_model_experiment_treatment",
27
+ }
28
+ //#endregion
29
+ //#endregion
30
+ export { FeatureGates };
@@ -0,0 +1,17 @@
1
+ import { Override } from "../utils/overrides.cjs";
2
+ import { OrgUIConfig, PageVariantConfig, WidgetConfig, WidgetMountingConfig } from "../../contexts/types.cjs";
3
+
4
+ //#region ../hooks/dist/application/models/frontendConfig.d.ts
5
+ //#region src/application/models/frontendConfig.d.ts
6
+ interface FrontendConfig {
7
+ merchant_override_css?: string;
8
+ pageVariants?: PageVariantConfig[];
9
+ mountingConfigs?: Record<string, WidgetMountingConfig>;
10
+ widgetConfigs?: Record<string, WidgetConfig>;
11
+ uiConfigs?: Omit<OrgUIConfig, 'merchantOverrideCss'>;
12
+ }
13
+ type FrontendConfigOverrides = Override<FrontendConfig>;
14
+ //#endregion
15
+
16
+ //#endregion
17
+ export { FrontendConfigOverrides };
@@ -0,0 +1,71 @@
1
+ import { SplitWords } from "./splitWords.cjs";
2
+
3
+ //#region ../hooks/dist/application/models/utilityTypes/camelCase.d.ts
4
+
5
+ //#region src/application/models/utilityTypes/camelCase.d.ts
6
+ /**
7
+ * CamelCase options.
8
+ *
9
+ * @see {@link CamelCase}
10
+ */
11
+ type CamelCaseOptions = {
12
+ /**
13
+ * Whether to preserved consecutive uppercase letter.
14
+ *
15
+ * @default true
16
+ */
17
+ preserveConsecutiveUppercase?: boolean;
18
+ };
19
+ /**
20
+ * Convert an array of words to camel-case.
21
+ */
22
+ type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions, OutputString extends string = ''> = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]] ? Options['preserveConsecutiveUppercase'] extends true ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}` : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}` : OutputString;
23
+ /**
24
+ * Convert a string literal to camel-case.
25
+ *
26
+ * This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
27
+ *
28
+ * By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
29
+ *
30
+ * @example
31
+ * ```
32
+ * import type {CamelCase} from 'type-fest';
33
+ *
34
+ * // Simple
35
+ *
36
+ * const someVariable: CamelCase<'foo-bar'> = 'fooBar';
37
+ *
38
+ * // Advanced
39
+ *
40
+ * type CamelCasedProperties<T> = {
41
+ * [K in keyof T as CamelCase<K>]: T[K]
42
+ * };
43
+ *
44
+ * interface RawOptions {
45
+ * 'dry-run': boolean;
46
+ * 'full_family_name': string;
47
+ * foo: number;
48
+ * BAR: string;
49
+ * QUZ_QUX: number;
50
+ * 'OTHER-FIELD': boolean;
51
+ * }
52
+ *
53
+ * const dbResult: CamelCasedProperties<RawOptions> = {
54
+ * dryRun: true,
55
+ * fullFamilyName: 'bar.js',
56
+ * foo: 123,
57
+ * bar: 'foo',
58
+ * quzQux: 6,
59
+ * otherField: false
60
+ * };
61
+ * ```
62
+ *
63
+ * @category Change case
64
+ * @category Template literal
65
+ */
66
+ type CamelCase<Type, Options extends CamelCaseOptions = {
67
+ preserveConsecutiveUppercase: true;
68
+ }> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
69
+ //#endregion
70
+ //#endregion
71
+ export { CamelCase, CamelCaseOptions };
@@ -0,0 +1,58 @@
1
+ import { CamelCase, CamelCaseOptions } from "./camelCase.cjs";
2
+ import { UnknownArray } from "./unknownArray.cjs";
3
+
4
+ //#region ../hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
5
+
6
+ //#region src/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
7
+ /**
8
+ * Convert object properties to camel case recursively.
9
+ *
10
+ * This can be useful when, for example, converting some API types from a different style.
11
+ *
12
+ * @see CamelCasedProperties
13
+ * @see CamelCase
14
+ *
15
+ * @example
16
+ * ```
17
+ * import type {CamelCasedPropertiesDeep} from 'type-fest';
18
+ *
19
+ * interface User {
20
+ * UserId: number;
21
+ * UserName: string;
22
+ * }
23
+ *
24
+ * interface UserWithFriends {
25
+ * UserInfo: User;
26
+ * UserFriends: User[];
27
+ * }
28
+ *
29
+ * const result: CamelCasedPropertiesDeep<UserWithFriends> = {
30
+ * userInfo: {
31
+ * userId: 1,
32
+ * userName: 'Tom',
33
+ * },
34
+ * userFriends: [
35
+ * {
36
+ * userId: 2,
37
+ * userName: 'Jerry',
38
+ * },
39
+ * {
40
+ * userId: 3,
41
+ * userName: 'Spike',
42
+ * },
43
+ * ],
44
+ * };
45
+ * ```
46
+ *
47
+ * @category Change case
48
+ * @category Template literal
49
+ * @category Object
50
+ */
51
+ type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {
52
+ preserveConsecutiveUppercase: true;
53
+ }> = Value extends Function ? Value : Value extends UnknownArray ? CamelCasedPropertiesArrayDeep<Value> : Value extends Set<infer U> ? Set<CamelCasedPropertiesDeep<U, Options>> : { [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options> };
54
+ type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [infer U, ...infer V] ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends Array<infer U> ? Array<CamelCasedPropertiesDeep<U>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<CamelCasedPropertiesDeep<U>> : never;
55
+ //#endregion
56
+
57
+ //#endregion
58
+ export { CamelCasedPropertiesDeep };
@@ -0,0 +1,22 @@
1
+ import { Trim } from "./trim.cjs";
2
+
3
+ //#region ../hooks/dist/application/models/utilityTypes/internal.d.ts
4
+
5
+ /**
6
+ * Returns a boolean for whether the string is numeric.
7
+ *
8
+ * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
9
+ */
10
+ type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
11
+ /**
12
+ * Returns a boolean for whether the string is lowercased.
13
+ */
14
+ type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
15
+ /**
16
+ * Returns a boolean for whether the string is upper-cased.
17
+ */
18
+ type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
19
+ type WordSeparators = '-' | '_' | Whitespace;
20
+ type Whitespace = '\u{9}' | '\u{A}' | '\u{B}' | '\u{C}' | '\u{D}' | '\u{20}' | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
21
+ //#endregion
22
+ export { IsLowerCase, IsNumeric, IsUpperCase, Whitespace, WordSeparators };
@@ -0,0 +1,31 @@
1
+ import { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from "./internal.cjs";
2
+
3
+ //#region ../hooks/dist/application/models/utilityTypes/splitWords.d.ts
4
+ //#region src/application/models/utilityTypes/splitWords.d.ts
5
+ type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
6
+ type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
7
+ /**
8
+ * Split a string (almost) like Lodash's `_.words()` function.
9
+ *
10
+ * - Split on each word that begins with a capital letter.
11
+ * - Split on each {@link WordSeparators}.
12
+ * - Split on numeric sequence.
13
+ *
14
+ * @example
15
+ * ```
16
+ * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
17
+ * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
18
+ * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
19
+ * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
20
+ * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
21
+ * ```
22
+ *
23
+ * @internal
24
+ * @category Change case
25
+ * @category Template literal
26
+ */
27
+ type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
28
+ //#endregion
29
+
30
+ //#endregion
31
+ export { SplitWords };