@seekora-ai/ui-sdk-react 0.2.11 → 0.2.13

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 (120) hide show
  1. package/dist/components/InfiniteHits.d.ts +2 -0
  2. package/dist/components/InfiniteHits.d.ts.map +1 -1
  3. package/dist/components/InfiniteHits.js +6 -3
  4. package/dist/components/QuerySuggestions.d.ts +2 -0
  5. package/dist/components/QuerySuggestions.d.ts.map +1 -1
  6. package/dist/components/QuerySuggestions.js +4 -3
  7. package/dist/components/QuerySuggestionsDropdown.d.ts +1 -1
  8. package/dist/components/QuerySuggestionsDropdown.d.ts.map +1 -1
  9. package/dist/components/QuerySuggestionsDropdown.js +4 -4
  10. package/dist/components/Recommendations.d.ts +6 -0
  11. package/dist/components/Recommendations.d.ts.map +1 -1
  12. package/dist/components/Recommendations.js +12 -6
  13. package/dist/components/RichQuerySuggestions.d.ts +4 -0
  14. package/dist/components/RichQuerySuggestions.d.ts.map +1 -1
  15. package/dist/components/RichQuerySuggestions.js +2 -3
  16. package/dist/components/SearchBar.d.ts +2 -0
  17. package/dist/components/SearchBar.d.ts.map +1 -1
  18. package/dist/components/SearchBar.js +5 -9
  19. package/dist/components/SearchResults.d.ts +2 -0
  20. package/dist/components/SearchResults.d.ts.map +1 -1
  21. package/dist/components/SearchResults.js +4 -2
  22. package/dist/components/primitives/ActionButtons.d.ts +27 -0
  23. package/dist/components/primitives/ActionButtons.d.ts.map +1 -0
  24. package/dist/components/primitives/ActionButtons.js +78 -0
  25. package/dist/components/primitives/AnalyticsProvider.d.ts +22 -0
  26. package/dist/components/primitives/AnalyticsProvider.d.ts.map +1 -0
  27. package/dist/components/primitives/AnalyticsProvider.js +87 -0
  28. package/dist/components/primitives/BadgeList.d.ts +14 -0
  29. package/dist/components/primitives/BadgeList.d.ts.map +1 -0
  30. package/dist/components/primitives/BadgeList.js +45 -0
  31. package/dist/components/primitives/ImageDisplay.d.ts +10 -1
  32. package/dist/components/primitives/ImageDisplay.d.ts.map +1 -1
  33. package/dist/components/primitives/ImageDisplay.js +49 -9
  34. package/dist/components/primitives/ImageZoom.d.ts +33 -0
  35. package/dist/components/primitives/ImageZoom.d.ts.map +1 -0
  36. package/dist/components/primitives/ImageZoom.js +357 -0
  37. package/dist/components/primitives/PriceDisplay.d.ts +21 -0
  38. package/dist/components/primitives/PriceDisplay.d.ts.map +1 -0
  39. package/dist/components/primitives/PriceDisplay.js +44 -0
  40. package/dist/components/primitives/RatingDisplay.d.ts +43 -0
  41. package/dist/components/primitives/RatingDisplay.d.ts.map +1 -0
  42. package/dist/components/primitives/RatingDisplay.js +114 -0
  43. package/dist/components/primitives/VariantSelector.d.ts +30 -0
  44. package/dist/components/primitives/VariantSelector.d.ts.map +1 -0
  45. package/dist/components/primitives/VariantSelector.js +162 -0
  46. package/dist/components/primitives/VariantSwatches.d.ts +28 -0
  47. package/dist/components/primitives/VariantSwatches.d.ts.map +1 -0
  48. package/dist/components/primitives/VariantSwatches.js +173 -0
  49. package/dist/components/primitives/index.d.ts +9 -0
  50. package/dist/components/primitives/index.d.ts.map +1 -1
  51. package/dist/components/primitives/index.js +9 -0
  52. package/dist/components/primitives/withAnalytics.d.ts +24 -0
  53. package/dist/components/primitives/withAnalytics.d.ts.map +1 -0
  54. package/dist/components/primitives/withAnalytics.js +73 -0
  55. package/dist/components/product-page/ProductInfo.d.ts +25 -2
  56. package/dist/components/product-page/ProductInfo.d.ts.map +1 -1
  57. package/dist/components/product-page/ProductInfo.js +20 -5
  58. package/dist/components/section-primitives/SectionItemGrid.d.ts +3 -1
  59. package/dist/components/section-primitives/SectionItemGrid.d.ts.map +1 -1
  60. package/dist/components/section-primitives/SectionItemGrid.js +3 -2
  61. package/dist/components/suggestions/AmazonDropdown.d.ts.map +1 -1
  62. package/dist/components/suggestions/AmazonDropdown.js +2 -2
  63. package/dist/components/suggestions/GoogleDropdown.d.ts.map +1 -1
  64. package/dist/components/suggestions/GoogleDropdown.js +2 -2
  65. package/dist/components/suggestions/MinimalDropdown.d.ts.map +1 -1
  66. package/dist/components/suggestions/MinimalDropdown.js +2 -2
  67. package/dist/components/suggestions/MobileSheetDropdown.d.ts.map +1 -1
  68. package/dist/components/suggestions/MobileSheetDropdown.js +2 -2
  69. package/dist/components/suggestions/PinterestDropdown.d.ts.map +1 -1
  70. package/dist/components/suggestions/PinterestDropdown.js +2 -2
  71. package/dist/components/suggestions/ShopifyDropdown.d.ts.map +1 -1
  72. package/dist/components/suggestions/ShopifyDropdown.js +2 -2
  73. package/dist/components/suggestions/SpotlightDropdown.d.ts.map +1 -1
  74. package/dist/components/suggestions/SpotlightDropdown.js +2 -2
  75. package/dist/components/suggestions/SuggestionSearchBar.d.ts.map +1 -1
  76. package/dist/components/suggestions/SuggestionSearchBar.js +1 -0
  77. package/dist/components/suggestions/types.d.ts +26 -0
  78. package/dist/components/suggestions/types.d.ts.map +1 -1
  79. package/dist/components/suggestions/utils.d.ts +37 -0
  80. package/dist/components/suggestions/utils.d.ts.map +1 -1
  81. package/dist/components/suggestions/utils.js +118 -0
  82. package/dist/components/suggestions-primitives/ItemCard.d.ts +10 -1
  83. package/dist/components/suggestions-primitives/ItemCard.d.ts.map +1 -1
  84. package/dist/components/suggestions-primitives/ItemCard.js +20 -6
  85. package/dist/components/suggestions-primitives/ProductCard.d.ts +27 -3
  86. package/dist/components/suggestions-primitives/ProductCard.d.ts.map +1 -1
  87. package/dist/components/suggestions-primitives/ProductCard.js +124 -17
  88. package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts +44 -0
  89. package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts.map +1 -0
  90. package/dist/components/suggestions-primitives/ProductCardLayouts.js +105 -0
  91. package/dist/components/suggestions-primitives/ProductGrid.d.ts +6 -1
  92. package/dist/components/suggestions-primitives/ProductGrid.d.ts.map +1 -1
  93. package/dist/components/suggestions-primitives/ProductGrid.js +2 -2
  94. package/dist/components/suggestions-primitives/SuggestionList.d.ts +8 -1
  95. package/dist/components/suggestions-primitives/SuggestionList.d.ts.map +1 -1
  96. package/dist/components/suggestions-primitives/SuggestionList.js +7 -4
  97. package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.d.ts.map +1 -1
  98. package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.js +0 -2
  99. package/dist/docsearch/components/Results.d.ts +3 -1
  100. package/dist/docsearch/components/Results.d.ts.map +1 -1
  101. package/dist/docsearch/components/Results.js +6 -2
  102. package/dist/hooks/useProductAnalytics.d.ts +49 -0
  103. package/dist/hooks/useProductAnalytics.d.ts.map +1 -0
  104. package/dist/hooks/useProductAnalytics.js +116 -0
  105. package/dist/hooks/useQuerySuggestionsEnhanced.js +2 -1
  106. package/dist/hooks/useSuggestionsAnalytics.d.ts.map +1 -1
  107. package/dist/hooks/useSuggestionsAnalytics.js +6 -0
  108. package/dist/hooks/useVariantSelection.d.ts +28 -0
  109. package/dist/hooks/useVariantSelection.d.ts.map +1 -0
  110. package/dist/hooks/useVariantSelection.js +44 -0
  111. package/dist/index.d.ts +8 -3
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +5 -1
  114. package/dist/index.umd.js +1 -1
  115. package/dist/src/index.d.ts +1138 -681
  116. package/dist/src/index.esm.js +2407 -723
  117. package/dist/src/index.esm.js.map +1 -1
  118. package/dist/src/index.js +2423 -722
  119. package/dist/src/index.js.map +1 -1
  120. package/package.json +3 -3
@@ -2,8 +2,8 @@ import * as React$1 from 'react';
2
2
  import React__default, { ReactNode, CSSProperties } from 'react';
3
3
  import { SearchOptions, SearchResponse, SeekoraClient, SearchContext, DataTypesEventPayload, ExtendedEventPayload } from '@seekora-ai/search-sdk';
4
4
  import * as _seekora_ai_ui_sdk_types from '@seekora-ai/ui-sdk-types';
5
- import { ResultItem, ViewMode, FieldMapping, ThemeConfig, Theme, QuerySuggestionsEventHandlers, HighlightConfig, KeyboardNavConfig, AnimationConfig, QuerySuggestionsClassNames, SuggestionItem as SuggestionItem$3, RecentSearch, DropdownSectionConfig, SuggestionCategory, TrendingSearch, ProductItem, PopularBrand, FilteredTab, QuerySuggestionsVariant, QuerySuggestionsResponse, DropdownRecommendations, TopSearch, RelatedSearch } from '@seekora-ai/ui-sdk-types';
6
- export { FieldMapping, ResultItem, Theme, ThemeConfig, ViewMode } from '@seekora-ai/ui-sdk-types';
5
+ import { ResultItem, ViewMode, FieldMapping, ThemeConfig, Theme, QuerySuggestionsEventHandlers, HighlightConfig, KeyboardNavConfig, AnimationConfig, QuerySuggestionsClassNames, SuggestionItem as SuggestionItem$3, RecentSearch, DropdownSectionConfig, SuggestionCategory, TrendingSearch, ProductItem, PopularBrand, FilteredTab, QuerySuggestionsVariant, QuerySuggestionsResponse, DropdownRecommendations, TopSearch, RelatedSearch, PriceRange, ProductBadge, ProductOption, ProductVariant } from '@seekora-ai/ui-sdk-types';
6
+ export { FieldMapping, PriceRange, ProductBadge, ProductOption, ProductVariant, ResultItem, Theme, ThemeConfig, ViewMode } from '@seekora-ai/ui-sdk-types';
7
7
  import { SearchStateManagerConfig, SearchStateManager, HighlightPart, SearchState } from '@seekora-ai/ui-sdk-core';
8
8
  export { Fingerprint, FingerprintComponents, FingerprintConfig, FingerprintResult, getFingerprint, mergeThemes } from '@seekora-ai/ui-sdk-core';
9
9
 
@@ -41,6 +41,8 @@ interface SearchBarProps {
41
41
  className?: string;
42
42
  style?: React__default.CSSProperties;
43
43
  theme?: SearchBarTheme;
44
+ /** Show loading state when fetching and no previous suggestions (default false: show previous results until new render) */
45
+ showLoadingState?: boolean;
44
46
  renderSuggestion?: (suggestion: string, index: number) => React__default.ReactNode;
45
47
  renderLoading?: () => React__default.ReactNode;
46
48
  }
@@ -75,6 +77,8 @@ interface SearchResultsProps {
75
77
  onResultClick?: (result: ResultItem, index: number) => void;
76
78
  renderResult?: (result: ResultItem, index: number, isActive?: boolean) => React__default.ReactNode;
77
79
  renderEmpty?: () => React__default.ReactNode;
80
+ /** Show loading state when fetching and no previous results (default false: show previous results until new render) */
81
+ showLoadingState?: boolean;
78
82
  renderLoading?: () => React__default.ReactNode;
79
83
  renderError?: (error: Error) => React__default.ReactNode;
80
84
  className?: string;
@@ -533,6 +537,8 @@ interface InfiniteHitsProps {
533
537
  renderHit?: (hit: ResultItem, index: number) => React__default.ReactNode;
534
538
  /** Custom render for empty state */
535
539
  renderEmpty?: () => React__default.ReactNode;
540
+ /** Show initial loading when fetching and no hits yet (default false: no loading screen) */
541
+ showInitialLoading?: boolean;
536
542
  /** Custom render for loading state */
537
543
  renderLoading?: () => React__default.ReactNode;
538
544
  /** Custom render for "Show More" button */
@@ -888,6 +894,8 @@ interface RelatedProductsProps extends BaseRecommendationProps {
888
894
  items?: RecommendationItem[];
889
895
  /** Loading state */
890
896
  loading?: boolean;
897
+ /** Show loading state when fetching and no previous items (default false: show previous results until new render) */
898
+ showLoadingState?: boolean;
891
899
  }
892
900
  declare const RelatedProducts: React__default.FC<RelatedProductsProps>;
893
901
  interface TrendingItemsProps extends BaseRecommendationProps {
@@ -895,6 +903,8 @@ interface TrendingItemsProps extends BaseRecommendationProps {
895
903
  items?: RecommendationItem[];
896
904
  /** Loading state */
897
905
  loading?: boolean;
906
+ /** Show loading state when fetching and no previous items (default false: show previous results until new render) */
907
+ showLoadingState?: boolean;
898
908
  /** Facet name for trending (if using facet data) */
899
909
  facetName?: string;
900
910
  }
@@ -906,6 +916,8 @@ interface FrequentlyBoughtTogetherProps extends BaseRecommendationProps {
906
916
  items?: RecommendationItem[];
907
917
  /** Loading state */
908
918
  loading?: boolean;
919
+ /** Show loading state when fetching and no previous items (default false: show previous results until new render) */
920
+ showLoadingState?: boolean;
909
921
  /** Show "Add all to cart" button */
910
922
  showAddAllButton?: boolean;
911
923
  /** Callback when "Add all" is clicked */
@@ -952,6 +964,8 @@ interface QuerySuggestionsProps {
952
964
  minQueryLength?: number;
953
965
  onSuggestionClick?: (suggestion: string) => void;
954
966
  renderSuggestion?: (suggestion: SuggestionItem$2, index: number) => React__default.ReactNode;
967
+ /** Show loading state when fetching and no previous suggestions (default false: show previous results until new render) */
968
+ showLoadingState?: boolean;
955
969
  renderLoading?: () => React__default.ReactNode;
956
970
  renderEmpty?: () => React__default.ReactNode;
957
971
  showTitle?: boolean;
@@ -991,7 +1005,7 @@ interface QuerySuggestionsDropdownProps extends QuerySuggestionsEventHandlers {
991
1005
  maxRecentSearches?: number;
992
1006
  /** Show suggestion counts */
993
1007
  showCounts?: boolean;
994
- /** Show loading state */
1008
+ /** Show loading state (default false: show previous results until new results render) */
995
1009
  showLoading?: boolean;
996
1010
  /** Show empty state when no results */
997
1011
  showEmptyState?: boolean;
@@ -1104,6 +1118,10 @@ interface RichQuerySuggestionsProps extends QuerySuggestionsEventHandlers {
1104
1118
  header?: React__default.ReactNode;
1105
1119
  /** Custom footer content */
1106
1120
  footer?: React__default.ReactNode;
1121
+ /** Show loading overlay when fetching (default false: show previous results until new results render) */
1122
+ showLoadingOverlay?: boolean;
1123
+ /** Custom render for loading overlay (only when showLoadingOverlay is true) */
1124
+ renderLoading?: () => React__default.ReactNode;
1107
1125
  /** Dropdown width */
1108
1126
  width?: string | number;
1109
1127
  /** Dropdown max height */
@@ -1586,6 +1604,13 @@ interface SuggestionListProps {
1586
1604
  className?: string;
1587
1605
  style?: React__default.CSSProperties;
1588
1606
  listClassName?: string;
1607
+ /**
1608
+ * When true, show a loading state when fetching and no previous suggestions exist.
1609
+ * When false (default), show previous results until new results render; no loading screen.
1610
+ */
1611
+ showLoadingState?: boolean;
1612
+ /** Custom render for loading state (only when showLoadingState is true and loading with no items). */
1613
+ renderLoading?: () => React__default.ReactNode;
1589
1614
  /**
1590
1615
  * When true (default), suggestion text with <mark>...</mark> is rendered
1591
1616
  * with those segments highlighted. When false, plain text is shown.
@@ -1596,7 +1621,7 @@ interface SuggestionListProps {
1596
1621
  highlightMarkupOptions?: HighlightMarkupOptions;
1597
1622
  renderItem?: (suggestion: _seekora_ai_ui_sdk_types.SuggestionItem, index: number, isActive: boolean, onSelect: () => void) => React__default.ReactNode;
1598
1623
  }
1599
- declare function SuggestionList({ maxItems, className, style, listClassName, enableHighlightMarkup, highlightMarkupOptions, renderItem, }: SuggestionListProps): React__default.JSX.Element | null;
1624
+ declare function SuggestionList({ maxItems, className, style, listClassName, showLoadingState, renderLoading, enableHighlightMarkup, highlightMarkupOptions, renderItem, }: SuggestionListProps): React__default.JSX.Element | null;
1600
1625
 
1601
1626
  /**
1602
1627
  * SuggestionItem – single text suggestion row (primitive)
@@ -1627,6 +1652,33 @@ interface SuggestionItemProps {
1627
1652
  }
1628
1653
  declare function SuggestionItem$1({ suggestion, index, isActive, onSelect, className, style, enableHighlightMarkup, highlightMarkupOptions, renderHighlight, }: SuggestionItemProps): React__default.JSX.Element;
1629
1654
 
1655
+ /**
1656
+ * ActionButtons – card action buttons (add to cart, wishlist, buy now, quick view)
1657
+ *
1658
+ * Renders a set of action buttons for product cards. Can be positioned absolutely
1659
+ * over the image (on hover) or inline below the card content.
1660
+ */
1661
+
1662
+ type ActionButtonType = 'addToCart' | 'wishlist' | 'buyNow' | 'quickView' | 'compare';
1663
+ interface ActionButton {
1664
+ type: ActionButtonType;
1665
+ label?: string;
1666
+ icon?: React__default.ReactNode;
1667
+ onClick?: (e: React__default.MouseEvent) => void;
1668
+ disabled?: boolean;
1669
+ loading?: boolean;
1670
+ }
1671
+ interface ActionButtonsProps {
1672
+ buttons: ActionButton[];
1673
+ layout?: 'horizontal' | 'vertical' | 'overlay';
1674
+ position?: 'top-right' | 'bottom-center' | 'inline';
1675
+ showLabels?: boolean;
1676
+ size?: 'small' | 'medium' | 'large';
1677
+ className?: string;
1678
+ style?: React__default.CSSProperties;
1679
+ }
1680
+ declare function ActionButtons({ buttons, layout, position, showLabels, size, className, style, }: ActionButtonsProps): React__default.JSX.Element;
1681
+
1630
1682
  /**
1631
1683
  * ItemCard – generic item tile (primitive)
1632
1684
  *
@@ -1663,8 +1715,16 @@ interface ItemCardProps {
1663
1715
  asLink?: boolean;
1664
1716
  /** When multiple images, use ImageDisplay with this variant */
1665
1717
  imageVariant?: ImageDisplayVariant$1;
1718
+ /** Layout direction: vertical (default) or horizontal (image left, content right) */
1719
+ layout?: 'vertical' | 'horizontal';
1720
+ /** Action buttons (add to cart, wishlist, etc.) */
1721
+ actionButtons?: ActionButton[];
1722
+ /** Action buttons position */
1723
+ actionButtonsPosition?: 'overlay-top-right' | 'overlay-bottom' | 'inline';
1724
+ /** Show action button labels */
1725
+ showActionLabels?: boolean;
1666
1726
  }
1667
- declare function ItemCard({ item, position, onSelect, className, style, asLink, imageVariant, }: ItemCardProps): React__default.JSX.Element;
1727
+ declare function ItemCard({ item, position, onSelect, className, style, asLink, imageVariant, layout, actionButtons, actionButtonsPosition, showActionLabels, }: ItemCardProps): React__default.JSX.Element;
1668
1728
 
1669
1729
  /**
1670
1730
  * ItemGrid – generic grid of items (primitive)
@@ -1693,770 +1753,1055 @@ interface ItemGridProps<T = GenericItem> {
1693
1753
  }
1694
1754
  declare function ItemGrid<T = GenericItem>({ items, onItemClick, getItemId, getItemTitle, getItemImage, getItemDescription, getItemUrl, renderItem, maxItems, columns, className, style, gridClassName, }: ItemGridProps<T>): React__default.JSX.Element | null;
1695
1755
 
1696
- /**
1697
- * ProductCard – one product tile (primitive)
1698
- *
1699
- * Minimal layout: image (via ImageDisplay when imageVariant set), title, price.
1700
- * onClick calls context selectProduct. Overridable via className/style.
1701
- */
1702
-
1703
- type ProductCardImageVariant = 'single' | 'carousel' | 'hover' | 'thumbStrip' | 'thumbList';
1704
- interface ProductCardProps {
1705
- product: ProductItem;
1706
- position: number;
1707
- section?: string;
1708
- tabId?: string;
1709
- onSelect: () => void;
1710
- className?: string;
1711
- style?: React__default.CSSProperties;
1712
- imageVariant?: ProductCardImageVariant;
1756
+ /** Maps client's data fields to component expected fields */
1757
+ interface SuggestionFieldMapping {
1758
+ /** Field path for suggestion text (e.g., "query", "searchTerm", "text") */
1759
+ query: string;
1760
+ /** Field path for suggestion count/popularity */
1761
+ count?: string;
1762
+ /** Field path for object ID */
1763
+ id?: string;
1764
+ /** Field path for categories array */
1765
+ categories?: string;
1766
+ /** Field path for highlighted text */
1767
+ highlighted?: string;
1768
+ /** Custom field mappings */
1769
+ custom?: Record<string, string>;
1713
1770
  }
1714
- declare function ProductCard({ product, position, section, tabId, onSelect, className, style, imageVariant, }: ProductCardProps): React__default.JSX.Element;
1715
-
1716
- /**
1717
- * ProductGrid – grid of product cards from context (primitive)
1718
- *
1719
- * Uses trendingProducts or active tab products; each click calls context selectProduct.
1720
- */
1721
-
1722
- interface ProductGridProps {
1723
- maxItems?: number;
1724
- /** 'trending' | tab id for filtered tab products */
1725
- source?: 'trending' | string;
1726
- columns?: number;
1727
- className?: string;
1728
- style?: React__default.CSSProperties;
1729
- gridClassName?: string;
1771
+ /** Maps client's product fields to component expected fields */
1772
+ interface ProductFieldMapping {
1773
+ /** Field path for product ID */
1774
+ id: string;
1775
+ /** Field path for product title/name */
1776
+ title: string;
1777
+ /** Field path for product image URL */
1778
+ image?: string;
1779
+ /** Field path for product price */
1780
+ price?: string;
1781
+ /** Field path for original/compare price */
1782
+ comparePrice?: string;
1783
+ /** Field path for product URL */
1784
+ url?: string;
1785
+ /** Field path for brand name */
1786
+ brand?: string;
1787
+ /** Field path for category */
1788
+ category?: string;
1789
+ /** Field path for rating */
1790
+ rating?: string;
1791
+ /** Field path for review count */
1792
+ reviewCount?: string;
1793
+ /** Field path for discount percentage */
1794
+ discount?: string;
1795
+ /** Field path for availability/in stock */
1796
+ inStock?: string;
1797
+ /** Field path for currency */
1798
+ currency?: string;
1799
+ /** Field path for multiple images */
1800
+ images?: string;
1801
+ /** Field path for original/compare price (alias) */
1802
+ originalPrice?: string;
1803
+ /** Field path for availability */
1804
+ available?: string;
1805
+ /** Field path for product options (Color, Size axes) */
1806
+ options?: string;
1807
+ /** Field path for product variants */
1808
+ variants?: string;
1809
+ /** Field path for product tags */
1810
+ tags?: string;
1811
+ /** Custom field mappings */
1812
+ custom?: Record<string, string>;
1730
1813
  }
1731
- declare function ProductGrid({ maxItems, source, columns, className, style, gridClassName, }: ProductGridProps): React__default.JSX.Element | null;
1732
-
1733
- /**
1734
- * CategoriesTabs – horizontal tabs (e.g. filtered tabs) (primitive)
1735
- *
1736
- * Active tab from context; on select updates context and tracks analytics.
1737
- */
1738
-
1739
- interface CategoriesTabsProps {
1740
- className?: string;
1741
- style?: React__default.CSSProperties;
1742
- tabClassName?: string;
1814
+ /** Maps client's category/tab fields */
1815
+ interface CategoryFieldMapping {
1816
+ id: string;
1817
+ label: string;
1818
+ count?: string;
1819
+ icon?: string;
1820
+ image?: string;
1743
1821
  }
1744
- declare function CategoriesTabs({ className, style, tabClassName }: CategoriesTabsProps): React__default.JSX.Element | null;
1745
-
1746
- /**
1747
- * RecentSearchesList – list of recent queries (primitive)
1748
- *
1749
- * Reads recentSearches from context; each click calls selectRecentSearch. Optional title/render.
1750
- */
1751
-
1752
- interface RecentSearchesListProps {
1753
- title?: string;
1754
- maxItems?: number;
1755
- className?: string;
1756
- style?: React__default.CSSProperties;
1757
- listClassName?: string;
1758
- renderItem?: (search: RecentSearch, index: number, onSelect: () => void) => React__default.ReactNode;
1822
+ /** Maps client's brand fields */
1823
+ interface BrandFieldMapping {
1824
+ id?: string;
1825
+ name: string;
1826
+ logo?: string;
1827
+ count?: string;
1759
1828
  }
1760
- declare function RecentSearchesList({ title, maxItems, className, style, listClassName, renderItem, }: RecentSearchesListProps): React__default.JSX.Element | null;
1761
-
1762
- /**
1763
- * TrendingList list of trending searches (primitive)
1764
- *
1765
- * Reads trendingSearches from context; each click calls selectTrendingSearch. Optional title/render.
1766
- */
1767
-
1768
- interface TrendingListProps {
1769
- title?: string;
1770
- maxItems?: number;
1771
- className?: string;
1772
- style?: React__default.CSSProperties;
1773
- listClassName?: string;
1774
- renderItem?: (trending: TrendingSearch, index: number, onSelect: () => void) => React__default.ReactNode;
1829
+ type DropdownLayout = 'list' | 'two-column' | 'three-column' | 'grid' | 'hero' | 'full-width' | 'mobile-sheet' | 'overlay';
1830
+ type ProductCardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
1831
+ type ProductCardStyle = 'minimal' | 'standard' | 'detailed' | 'compact' | 'horizontal';
1832
+ /** Available dropdown variants */
1833
+ type SuggestionDropdownVariant$1 = 'amazon' | 'google' | 'pinterest' | 'spotlight' | 'shopify' | 'mobile-sheet' | 'minimal';
1834
+ interface VisualConfig {
1835
+ /** Overall dropdown layout */
1836
+ layout?: DropdownLayout;
1837
+ /** Show/hide shadows */
1838
+ shadows?: boolean;
1839
+ /** Border radius (px or CSS value) */
1840
+ borderRadius?: number | string;
1841
+ /** Animation style */
1842
+ animation?: 'none' | 'fade' | 'slide' | 'scale' | 'spring';
1843
+ /** Animation duration in ms */
1844
+ animationDuration?: number;
1845
+ /** Blur background when open */
1846
+ backdropBlur?: boolean;
1847
+ /** Show dividers between sections */
1848
+ showDividers?: boolean;
1849
+ /** Compact mode (reduced padding) */
1850
+ compact?: boolean;
1775
1851
  }
1776
- declare function TrendingList({ title, maxItems, className, style, listClassName, renderItem, }: TrendingListProps): React__default.JSX.Element | null;
1777
-
1778
- /**
1779
- * SuggestionsLoading – loading indicator (primitive)
1780
- */
1781
-
1782
- interface SuggestionsLoadingProps {
1852
+ type SectionType = 'suggestions' | 'recent' | 'trending' | 'products' | 'categories' | 'brands' | 'collections' | 'pages' | 'custom';
1853
+ interface SectionConfig {
1854
+ /** Section identifier */
1855
+ id: SectionType | string;
1856
+ /** Section title (can be ReactNode for custom rendering) */
1857
+ title?: string | ReactNode;
1858
+ /** Whether section is enabled */
1859
+ enabled?: boolean;
1860
+ /** Maximum items to show */
1861
+ maxItems?: number;
1862
+ /** Section display order (lower = higher) */
1863
+ order?: number;
1864
+ /** Section-specific layout override */
1865
+ layout?: 'list' | 'grid' | 'horizontal-scroll' | 'chips';
1866
+ /** Number of columns for grid layout */
1867
+ columns?: number;
1868
+ /** Show "View All" link */
1869
+ showViewAll?: boolean;
1870
+ /** View All link URL or handler */
1871
+ viewAllLink?: string;
1872
+ /** Custom CSS class */
1783
1873
  className?: string;
1784
- style?: React__default.CSSProperties;
1785
- text?: string;
1874
+ /** Custom styles */
1875
+ style?: CSSProperties;
1876
+ /** Custom renderer for entire section */
1877
+ render?: (data: any[], config: SectionConfig) => ReactNode;
1878
+ /** Custom renderer for individual items */
1879
+ renderItem?: (item: any, index: number) => ReactNode;
1880
+ /** Empty state message */
1881
+ emptyMessage?: string;
1882
+ /** Icon for section header */
1883
+ icon?: ReactNode;
1786
1884
  }
1787
- declare function SuggestionsLoading({ className, style, text }: SuggestionsLoadingProps): React__default.JSX.Element | null;
1788
-
1789
- /**
1790
- * SuggestionsError – error message (primitive)
1791
- */
1792
-
1793
- interface SuggestionsErrorProps {
1794
- className?: string;
1795
- style?: React__default.CSSProperties;
1796
- render?: (error: Error) => React__default.ReactNode;
1885
+ interface ProductDisplayConfig {
1886
+ /** Card size */
1887
+ size?: ProductCardSize;
1888
+ /** Card style */
1889
+ style?: ProductCardStyle;
1890
+ /** Show product image */
1891
+ showImage?: boolean;
1892
+ /** Image aspect ratio */
1893
+ imageAspectRatio?: '1:1' | '4:3' | '3:4' | '16:9' | 'auto';
1894
+ /** Show price */
1895
+ showPrice?: boolean;
1896
+ /** Show compare/original price */
1897
+ showComparePrice?: boolean;
1898
+ /** Show discount badge */
1899
+ showDiscount?: boolean;
1900
+ /** Show brand */
1901
+ showBrand?: boolean;
1902
+ /** Show rating */
1903
+ showRating?: boolean;
1904
+ /** Show stock status */
1905
+ showStock?: boolean;
1906
+ /** Show add to cart button */
1907
+ showAddToCart?: boolean;
1908
+ /** Currency symbol */
1909
+ currency?: string;
1910
+ /** Currency position */
1911
+ currencyPosition?: 'before' | 'after';
1912
+ /** Decimal places for price */
1913
+ priceDecimals?: number;
1914
+ /** Truncate title after N lines */
1915
+ titleLines?: number;
1916
+ /** Hover effect */
1917
+ hoverEffect?: 'none' | 'lift' | 'glow' | 'scale' | 'border';
1918
+ /** Image placeholder */
1919
+ imagePlaceholder?: ReactNode;
1920
+ /** Lazy load images */
1921
+ lazyLoadImages?: boolean;
1922
+ /** Show variant swatches on card */
1923
+ showVariants?: boolean;
1924
+ /** Which option names to show as swatches (e.g., ['Color']). Default: all */
1925
+ variantOptionsToShow?: string[];
1926
+ /** Max variant values before "+N more" (default: 5) */
1927
+ maxVariantValues?: number;
1928
+ /** Show price range when variants have different prices */
1929
+ showPriceRange?: boolean;
1930
+ /** Show badges (sale, new, sold out, etc.) */
1931
+ showBadges?: boolean;
1932
+ /** Custom badge extractor from tags */
1933
+ badgeExtractor?: (tags?: string[], product?: any) => _seekora_ai_ui_sdk_types.ProductBadge[];
1797
1934
  }
1798
- declare function SuggestionsError({ className, style, render }: SuggestionsErrorProps): React__default.JSX.Element | null;
1799
-
1800
- /**
1801
- * SuggestionsDropdownComposition – reference composition
1802
- *
1803
- * Example layout built from primitives: SearchInput + DropdownPanel containing
1804
- * RecentSearchesList (when query empty), SuggestionList, CategoriesTabs, ProductGrid, TrendingList.
1805
- * Wrap with SearchProvider and SuggestionsProvider. Use as reference or replace
1806
- * with your own arrangement of the same primitives.
1807
- */
1808
-
1809
- interface SuggestionsDropdownCompositionProps extends Omit<SuggestionsProviderProps, 'children'> {
1810
- /** Show recent searches when query is empty */
1811
- showRecentSearches?: boolean;
1812
- /** Show trending list */
1813
- showTrending?: boolean;
1814
- /** Show categories/filtered tabs */
1815
- showTabs?: boolean;
1816
- /** Show product grid */
1817
- showProducts?: boolean;
1818
- /** SearchInput placeholder */
1819
- placeholder?: string;
1935
+ interface SuggestionDisplayConfig {
1936
+ /** Show search icon */
1937
+ showIcon?: boolean;
1938
+ /** Custom icon */
1939
+ icon?: ReactNode;
1940
+ /** Show hit count */
1941
+ showCount?: boolean;
1942
+ /** Show categories inline */
1943
+ showCategories?: boolean;
1944
+ /** Max categories to show */
1945
+ maxCategories?: number;
1946
+ /** Highlight matching text */
1947
+ highlightMatches?: boolean;
1948
+ /** Highlight style */
1949
+ highlightStyle?: CSSProperties;
1950
+ /** Show arrow on hover */
1951
+ showArrow?: boolean;
1952
+ /** Category click behavior */
1953
+ categoryClickable?: boolean;
1954
+ }
1955
+ interface DropdownThemeConfig {
1956
+ /** Light/dark mode */
1957
+ mode?: 'light' | 'dark' | 'auto';
1958
+ /** Primary brand color */
1959
+ primaryColor?: string;
1960
+ /** Background color */
1961
+ backgroundColor?: string;
1962
+ /** Surface color (cards, sections) */
1963
+ surfaceColor?: string;
1964
+ /** Text color */
1965
+ textColor?: string;
1966
+ /** Secondary text color */
1967
+ textSecondaryColor?: string;
1968
+ /** Border color */
1969
+ borderColor?: string;
1970
+ /** Hover background */
1971
+ hoverColor?: string;
1972
+ /** Highlight/match color */
1973
+ highlightColor?: string;
1974
+ /** Success color (in stock, etc.) */
1975
+ successColor?: string;
1976
+ /** Error color (out of stock, etc.) */
1977
+ errorColor?: string;
1978
+ /** Font family */
1979
+ fontFamily?: string;
1980
+ /** Base font size */
1981
+ fontSize?: number | string;
1982
+ /** Border radius */
1983
+ borderRadius?: number | string;
1984
+ /** Box shadow */
1985
+ boxShadow?: string;
1986
+ /** Custom CSS variables */
1987
+ cssVariables?: Record<string, string>;
1988
+ }
1989
+ interface AnalyticsConfig {
1990
+ /** Enable analytics */
1991
+ enabled?: boolean;
1992
+ /** Track suggestion clicks */
1993
+ trackSuggestionClicks?: boolean;
1994
+ /** Track product clicks */
1995
+ trackProductClicks?: boolean;
1996
+ /** Track impressions */
1997
+ trackImpressions?: boolean;
1998
+ /** Impression debounce time (ms) */
1999
+ impressionDebounce?: number;
2000
+ /** Track category clicks */
2001
+ trackCategoryClicks?: boolean;
2002
+ /** Track brand clicks */
2003
+ trackBrandClicks?: boolean;
2004
+ /** Track search submissions */
2005
+ trackSearchSubmit?: boolean;
2006
+ /** Custom analytics tags */
2007
+ tags?: string[];
2008
+ /** User ID for personalization */
2009
+ userId?: string;
2010
+ /** Session ID */
2011
+ sessionId?: string;
2012
+ /** Custom event handler */
2013
+ onEvent?: (eventType: string, data: any) => void;
2014
+ }
2015
+ interface DropdownEventHandlers<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> {
2016
+ /** Suggestion selected */
2017
+ onSuggestionSelect?: (suggestion: TSuggestion, index: number) => void;
2018
+ /** Product clicked */
2019
+ onProductClick?: (product: TProduct, index: number) => void;
2020
+ /** Category clicked */
2021
+ onCategoryClick?: (category: TCategory, suggestion?: TSuggestion) => void;
2022
+ /** Brand clicked */
2023
+ onBrandClick?: (brand: TBrand) => void;
2024
+ /** Tab/filter changed */
2025
+ onTabChange?: (tabId: string, tab?: any) => void;
2026
+ /** Recent search clicked */
2027
+ onRecentClick?: (query: string) => void;
2028
+ /** Recent search removed */
2029
+ onRecentRemove?: (query: string) => void;
2030
+ /** Clear all recent searches */
2031
+ onRecentClearAll?: () => void;
2032
+ /** View all clicked */
2033
+ onViewAll?: (section: SectionType | string) => void;
2034
+ /** Search submitted */
2035
+ onSearchSubmit?: (query: string) => void;
2036
+ /** Dropdown opened */
2037
+ onOpen?: () => void;
2038
+ /** Dropdown closed */
2039
+ onClose?: () => void;
2040
+ /** Keyboard navigation */
2041
+ onNavigate?: (direction: 'up' | 'down' | 'left' | 'right', index: number) => void;
2042
+ /** Add to cart clicked (if enabled) */
2043
+ onAddToCart?: (product: TProduct) => void;
2044
+ }
2045
+ interface AccessibilityConfig {
2046
+ /** ARIA label for dropdown */
2047
+ ariaLabel?: string;
2048
+ /** ARIA labelledby */
2049
+ ariaLabelledBy?: string;
2050
+ /** Announce selection to screen readers */
2051
+ announceSelection?: boolean;
2052
+ /** Custom announcement text */
2053
+ getAnnouncementText?: (item: any, type: string) => string;
2054
+ /** Keyboard navigation enabled */
2055
+ keyboardNavigation?: boolean;
2056
+ /** Focus trap (keep focus within dropdown) */
2057
+ focusTrap?: boolean;
2058
+ /** Auto focus first item */
2059
+ autoFocus?: boolean;
2060
+ /** Close on escape */
2061
+ closeOnEscape?: boolean;
2062
+ /** Close on click outside */
2063
+ closeOnClickOutside?: boolean;
2064
+ }
2065
+ interface BaseDropdownProps<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> extends DropdownEventHandlers<TSuggestion, TProduct, TCategory, TBrand> {
2066
+ /** Current search query */
2067
+ query: string;
2068
+ /** Whether dropdown is open/visible */
2069
+ isOpen?: boolean;
2070
+ /** Loading state */
2071
+ loading?: boolean;
2072
+ /** Error state */
2073
+ error?: Error | string | null;
2074
+ /** Suggestion items */
2075
+ suggestions?: TSuggestion[];
2076
+ /** Product items */
2077
+ products?: TProduct[];
2078
+ /** Category/filter tabs */
2079
+ categories?: TCategory[];
2080
+ /** Brand items */
2081
+ brands?: TBrand[];
2082
+ /** Recent searches (strings or objects) */
2083
+ recentSearches?: string[] | Array<{
2084
+ query: string;
2085
+ timestamp?: number;
2086
+ }>;
2087
+ /** Trending searches */
2088
+ trendingSearches?: string[] | TSuggestion[];
2089
+ /** Filtered tabs with products */
2090
+ filteredTabs?: Array<{
2091
+ id: string;
2092
+ label: string;
2093
+ products?: TProduct[];
2094
+ nb_hits?: number;
2095
+ filter?: string;
2096
+ }>;
2097
+ /** Currently active tab ID */
2098
+ activeTab?: string;
2099
+ /** Map suggestion data fields */
2100
+ suggestionFields?: SuggestionFieldMapping;
2101
+ /** Map product data fields */
2102
+ productFields?: ProductFieldMapping;
2103
+ /** Map category data fields */
2104
+ categoryFields?: CategoryFieldMapping;
2105
+ /** Map brand data fields */
2106
+ brandFields?: BrandFieldMapping;
2107
+ /** Section configurations */
2108
+ sections?: SectionConfig[];
2109
+ /** Product display config */
2110
+ productDisplay?: ProductDisplayConfig;
2111
+ /** Suggestion display config */
2112
+ suggestionDisplay?: SuggestionDisplayConfig;
2113
+ /** Visual/layout config */
2114
+ visual?: VisualConfig;
2115
+ /** Theme config */
2116
+ theme?: DropdownThemeConfig;
2117
+ /** Analytics config */
2118
+ analytics?: AnalyticsConfig;
2119
+ /** Accessibility config */
2120
+ accessibility?: AccessibilityConfig;
2121
+ /** Dropdown width */
2122
+ width?: string | number;
2123
+ /** Dropdown max height */
2124
+ maxHeight?: string | number;
2125
+ /** Dropdown min height */
2126
+ minHeight?: string | number;
2127
+ /** Z-index */
2128
+ zIndex?: number;
2129
+ /** Root CSS class */
2130
+ className?: string;
2131
+ /** Root inline styles */
2132
+ style?: CSSProperties;
2133
+ /** CSS classes for parts */
2134
+ classNames?: Partial<DropdownClassNames>;
2135
+ /** Inline styles for parts */
2136
+ styles?: Partial<DropdownStyles>;
2137
+ /** Custom header */
2138
+ header?: ReactNode;
2139
+ /** Custom footer */
2140
+ footer?: ReactNode;
2141
+ /** Custom loading state */
2142
+ /** Show loading state when fetching and no previous items (default false: show previous results until new render) */
2143
+ showLoadingState?: boolean;
2144
+ renderLoading?: () => ReactNode;
2145
+ /** Custom empty state */
2146
+ renderEmpty?: (query: string) => ReactNode;
2147
+ /** Custom error state */
2148
+ renderError?: (error: Error | string) => ReactNode;
2149
+ /** Reference to input element (for focus management) */
2150
+ inputRef?: React.RefObject<HTMLInputElement>;
2151
+ }
2152
+ interface DropdownClassNames {
2153
+ root: string;
2154
+ container: string;
2155
+ header: string;
2156
+ content: string;
2157
+ footer: string;
2158
+ section: string;
2159
+ sectionHeader: string;
2160
+ sectionTitle: string;
2161
+ sectionContent: string;
2162
+ sectionViewAll: string;
2163
+ suggestionsList: string;
2164
+ suggestionItem: string;
2165
+ suggestionItemActive: string;
2166
+ suggestionIcon: string;
2167
+ suggestionText: string;
2168
+ suggestionHighlight: string;
2169
+ suggestionCount: string;
2170
+ suggestionCategories: string;
2171
+ suggestionCategory: string;
2172
+ suggestionArrow: string;
2173
+ productsList: string;
2174
+ productCard: string;
2175
+ productCardHover: string;
2176
+ productImage: string;
2177
+ productImagePlaceholder: string;
2178
+ productInfo: string;
2179
+ productTitle: string;
2180
+ productBrand: string;
2181
+ productPrice: string;
2182
+ productComparePrice: string;
2183
+ productDiscount: string;
2184
+ productRating: string;
2185
+ productStock: string;
2186
+ productAddToCart: string;
2187
+ categoriesList: string;
2188
+ categoryItem: string;
2189
+ categoryItemActive: string;
2190
+ categoryIcon: string;
2191
+ categoryLabel: string;
2192
+ categoryCount: string;
2193
+ brandsList: string;
2194
+ brandItem: string;
2195
+ brandLogo: string;
2196
+ brandName: string;
2197
+ recentList: string;
2198
+ recentItem: string;
2199
+ recentIcon: string;
2200
+ recentText: string;
2201
+ recentRemove: string;
2202
+ recentClearAll: string;
2203
+ trendingList: string;
2204
+ trendingItem: string;
2205
+ trendingIcon: string;
2206
+ tabsList: string;
2207
+ tabItem: string;
2208
+ tabItemActive: string;
2209
+ tabCount: string;
2210
+ loading: string;
2211
+ loadingSpinner: string;
2212
+ empty: string;
2213
+ emptyIcon: string;
2214
+ emptyText: string;
2215
+ error: string;
2216
+ errorIcon: string;
2217
+ errorText: string;
2218
+ keyboard: string;
2219
+ keyboardHint: string;
2220
+ keyboardKey: string;
2221
+ }
2222
+ interface DropdownStyles {
2223
+ root: CSSProperties;
2224
+ container: CSSProperties;
2225
+ header: CSSProperties;
2226
+ content: CSSProperties;
2227
+ footer: CSSProperties;
2228
+ section: CSSProperties;
2229
+ suggestionItem: CSSProperties;
2230
+ productCard: CSSProperties;
2231
+ categoryItem: CSSProperties;
2232
+ brandItem: CSSProperties;
2233
+ }
2234
+ interface DropdownRef {
2235
+ /** Get currently active/focused index */
2236
+ getActiveIndex: () => number;
2237
+ /** Set active index */
2238
+ setActiveIndex: (index: number) => void;
2239
+ /** Select currently active item */
2240
+ selectActive: () => void;
2241
+ /** Navigate to next item */
2242
+ navigateNext: () => void;
2243
+ /** Navigate to previous item */
2244
+ navigatePrevious: () => void;
2245
+ /** Focus the dropdown */
2246
+ focus: () => void;
2247
+ /** Close the dropdown */
2248
+ close: () => void;
2249
+ /** Get active tab ID (if tabs exist) */
2250
+ getActiveTab?: () => string | null;
2251
+ /** Set active tab */
2252
+ setActiveTab?: (tabId: string) => void;
2253
+ /** Scroll to item */
2254
+ scrollToItem?: (index: number) => void;
1820
2255
  }
1821
- declare function SuggestionsDropdownComposition({ showRecentSearches, showTrending, showTabs, showProducts, placeholder, ...providerProps }: SuggestionsDropdownCompositionProps): React__default.JSX.Element;
1822
2256
 
1823
2257
  /**
1824
- * ImageDisplayconfigurable multi-image display (primitive)
2258
+ * ProductCardone product tile (primitive)
1825
2259
  *
1826
- * Variants: single, carousel, hover, thumbStrip, thumbList. Use in ItemCard,
1827
- * ProductCard, ProductGallery. Overridable via className/style.
2260
+ * Without displayConfig: renders the original minimal layout (image, title, price).
2261
+ * With displayConfig: renders layout variants (minimal, standard, detailed, compact, horizontal).
1828
2262
  */
1829
2263
 
1830
- type ImageDisplayVariant = 'single' | 'carousel' | 'hover' | 'thumbStrip' | 'thumbList';
1831
- interface ImageDisplayProps {
1832
- images: string[];
1833
- variant?: ImageDisplayVariant;
1834
- alt?: string;
2264
+ type ProductCardImageVariant = 'single' | 'carousel' | 'hover' | 'thumbStrip' | 'thumbList';
2265
+ interface ProductCardProps {
2266
+ product: ProductItem;
2267
+ position: number;
2268
+ section?: string;
2269
+ tabId?: string;
2270
+ onSelect: () => void;
1835
2271
  className?: string;
1836
2272
  style?: React__default.CSSProperties;
1837
- carouselAutoplay?: boolean;
1838
- carouselIntervalMs?: number;
1839
- }
1840
- declare function ImageDisplay({ images, variant, alt, className, style, carouselAutoplay, carouselIntervalMs, }: ImageDisplayProps): React__default.JSX.Element;
2273
+ imageVariant?: ProductCardImageVariant;
2274
+ /** Product display configuration for layout variants */
2275
+ displayConfig?: ProductDisplayConfig;
2276
+ /** Callback when a variant swatch is hovered (e.g., to swap card image) */
2277
+ onVariantHover?: (optionName: string, value: string) => void;
2278
+ /** Callback when a variant swatch is clicked (e.g., to swap card image permanently) */
2279
+ onVariantClick?: (optionName: string, value: string) => void;
2280
+ /** Currently selected variant values (e.g., { Color: 'Black', Size: 'M' }) */
2281
+ selectedVariants?: Record<string, string>;
2282
+ /** Render as link when true and product.url exists */
2283
+ asLink?: boolean;
2284
+ /** Action buttons (add to cart, wishlist, etc.) */
2285
+ actionButtons?: ActionButton[];
2286
+ /** Action buttons position */
2287
+ actionButtonsPosition?: 'overlay-top-right' | 'overlay-bottom' | 'inline';
2288
+ /** Show action button labels */
2289
+ showActionLabels?: boolean;
2290
+ /** Enable image zoom functionality */
2291
+ enableImageZoom?: boolean;
2292
+ /** Image zoom mode: 'hover' (Amazon-style), 'lens', 'click' (lightbox), 'both' (hover + click) */
2293
+ imageZoomMode?: 'hover' | 'lens' | 'click' | 'both';
2294
+ /** Image zoom magnification level (2 = 200%, 3 = 300%) */
2295
+ imageZoomLevel?: number;
2296
+ }
2297
+ declare function ProductCard({ product, position, section, tabId, onSelect, className, style, imageVariant, displayConfig, onVariantHover, onVariantClick, selectedVariants, asLink, actionButtons, actionButtonsPosition, showActionLabels, enableImageZoom, imageZoomMode, imageZoomLevel, }: ProductCardProps): React__default.JSX.Element;
1841
2298
 
1842
2299
  /**
1843
- * SectionSearchProviderpreset query + filter section
2300
+ * ProductGridgrid of product cards from context (primitive)
1844
2301
  *
1845
- * Runs client.search(query, { refinements, hitsPerPage, sortBy }) on mount and when
1846
- * query/filters change. Does not use global SearchStateManager. Use for menus,
1847
- * sidebar, front-page blocks (e.g. "New arrivals", "On sale").
2302
+ * Uses trendingProducts or active tab products; each click calls context selectProduct.
1848
2303
  */
1849
2304
 
1850
- interface RefinementInput {
1851
- field: string;
1852
- value: string;
1853
- }
1854
- interface SectionSearchProviderProps {
1855
- children: React__default.ReactNode;
1856
- query: string;
1857
- refinements?: RefinementInput[];
2305
+ interface ProductGridProps {
1858
2306
  maxItems?: number;
1859
- sortBy?: string;
1860
- enabled?: boolean;
1861
- sectionId?: string;
2307
+ /** 'trending' | tab id for filtered tab products */
2308
+ source?: 'trending' | string;
2309
+ columns?: number;
2310
+ className?: string;
2311
+ style?: React__default.CSSProperties;
2312
+ gridClassName?: string;
2313
+ /** Product display configuration passed through to each ProductCard */
2314
+ displayConfig?: ProductDisplayConfig;
2315
+ /** Callback when a variant swatch is hovered on a card */
2316
+ onVariantHover?: (optionName: string, value: string) => void;
1862
2317
  }
1863
- declare function SectionSearchProvider({ children, query, refinements, maxItems, sortBy, enabled, sectionId, }: SectionSearchProviderProps): React__default.JSX.Element;
2318
+ declare function ProductGrid({ maxItems, source, columns, className, style, gridClassName, displayConfig, onVariantHover, }: ProductGridProps): React__default.JSX.Element | null;
1864
2319
 
1865
2320
  /**
1866
- * SectionSearchContextpreset query/filter section state
2321
+ * CategoriesTabshorizontal tabs (e.g. filtered tabs) (primitive)
1867
2322
  *
1868
- * For menus, sidebar, front-page blocks. Independent of main search state.
2323
+ * Active tab from context; on select updates context and tracks analytics.
1869
2324
  */
1870
2325
 
1871
- interface SectionSearchContextValue {
1872
- items: unknown[];
1873
- loading: boolean;
1874
- error: Error | null;
1875
- totalCount: number;
1876
- sectionId?: string;
1877
- trackClick: (item: unknown, position: number) => void;
2326
+ interface CategoriesTabsProps {
2327
+ className?: string;
2328
+ style?: React__default.CSSProperties;
2329
+ tabClassName?: string;
1878
2330
  }
1879
- declare function useSectionSearchContext(): SectionSearchContextValue;
2331
+ declare function CategoriesTabs({ className, style, tabClassName }: CategoriesTabsProps): React__default.JSX.Element | null;
1880
2332
 
1881
2333
  /**
1882
- * SectionItemGridgeneric grid of items from SectionSearchProvider (primitive)
2334
+ * RecentSearchesListlist of recent queries (primitive)
2335
+ *
2336
+ * Reads recentSearches from context; each click calls selectRecentSearch. Optional title/render.
1883
2337
  */
1884
2338
 
1885
- interface SectionItemGridProps {
1886
- columns?: number;
2339
+ interface RecentSearchesListProps {
2340
+ title?: string;
1887
2341
  maxItems?: number;
1888
2342
  className?: string;
1889
2343
  style?: React__default.CSSProperties;
1890
- getItemId?: (item: unknown) => string;
1891
- getItemTitle?: (item: unknown) => string;
1892
- getItemImage?: (item: unknown) => string | undefined;
1893
- getItemDescription?: (item: unknown) => string | undefined;
1894
- getItemUrl?: (item: unknown) => string | undefined;
1895
- renderItem?: (item: unknown, index: number) => React__default.ReactNode;
2344
+ listClassName?: string;
2345
+ renderItem?: (search: RecentSearch, index: number, onSelect: () => void) => React__default.ReactNode;
1896
2346
  }
1897
- declare function SectionItemGrid({ columns, maxItems, className, style, getItemId, getItemTitle, getItemImage, getItemDescription, getItemUrl, renderItem, }: SectionItemGridProps): React__default.JSX.Element;
2347
+ declare function RecentSearchesList({ title, maxItems, className, style, listClassName, renderItem, }: RecentSearchesListProps): React__default.JSX.Element | null;
1898
2348
 
1899
2349
  /**
1900
- * SectionLoadingloading state for section (primitive)
2350
+ * TrendingListlist of trending searches (primitive)
2351
+ *
2352
+ * Reads trendingSearches from context; each click calls selectTrendingSearch. Optional title/render.
1901
2353
  */
1902
2354
 
1903
- interface SectionLoadingProps {
2355
+ interface TrendingListProps {
2356
+ title?: string;
2357
+ maxItems?: number;
1904
2358
  className?: string;
1905
2359
  style?: React__default.CSSProperties;
1906
- text?: string;
2360
+ listClassName?: string;
2361
+ renderItem?: (trending: TrendingSearch, index: number, onSelect: () => void) => React__default.ReactNode;
1907
2362
  }
1908
- declare function SectionLoading({ className, style, text }: SectionLoadingProps): React__default.JSX.Element | null;
2363
+ declare function TrendingList({ title, maxItems, className, style, listClassName, renderItem, }: TrendingListProps): React__default.JSX.Element | null;
1909
2364
 
1910
2365
  /**
1911
- * SectionErrorerror state for section (primitive)
2366
+ * SuggestionsLoadingloading indicator (primitive)
1912
2367
  */
1913
2368
 
1914
- interface SectionErrorProps {
2369
+ interface SuggestionsLoadingProps {
1915
2370
  className?: string;
1916
2371
  style?: React__default.CSSProperties;
1917
- render?: (error: Error) => React__default.ReactNode;
2372
+ text?: string;
1918
2373
  }
1919
- declare function SectionError({ className, style, render }: SectionErrorProps): React__default.JSX.Element | null;
2374
+ declare function SuggestionsLoading({ className, style, text }: SuggestionsLoadingProps): React__default.JSX.Element | null;
1920
2375
 
1921
2376
  /**
1922
- * ProductGalleryproduct detail image gallery (primitive)
1923
- *
1924
- * Uses ImageDisplay with configurable variant (carousel, thumbStrip, etc.).
1925
- * For use on individual product page.
2377
+ * SuggestionsErrorerror message (primitive)
1926
2378
  */
1927
2379
 
1928
- interface ProductGalleryProps {
1929
- images: string[];
1930
- variant?: ImageDisplayVariant;
1931
- alt?: string;
2380
+ interface SuggestionsErrorProps {
1932
2381
  className?: string;
1933
2382
  style?: React__default.CSSProperties;
1934
- carouselAutoplay?: boolean;
1935
- carouselIntervalMs?: number;
2383
+ render?: (error: Error) => React__default.ReactNode;
1936
2384
  }
1937
- declare function ProductGallery({ images, variant, alt, className, style, carouselAutoplay, carouselIntervalMs, }: ProductGalleryProps): React__default.JSX.Element;
2385
+ declare function SuggestionsError({ className, style, render }: SuggestionsErrorProps): React__default.JSX.Element | null;
1938
2386
 
1939
2387
  /**
1940
- * ProductInfoproduct detail block (primitive)
2388
+ * SuggestionsDropdownCompositionreference composition
1941
2389
  *
1942
- * Title, description, price, optional variant selector and CTA. Minimal layout;
1943
- * override with className/style. For use on individual product page.
2390
+ * Example layout built from primitives: SearchInput + DropdownPanel containing
2391
+ * RecentSearchesList (when query empty), SuggestionList, CategoriesTabs, ProductGrid, TrendingList.
2392
+ * Wrap with SearchProvider and SuggestionsProvider. Use as reference or replace
2393
+ * with your own arrangement of the same primitives.
1944
2394
  */
1945
2395
 
1946
- interface ProductInfoProps {
1947
- title: string;
1948
- description?: string;
1949
- price?: number | string;
1950
- currency?: string;
1951
- /** Optional variant selector (e.g. size/color) */
1952
- renderVariantSelector?: () => React__default.ReactNode;
1953
- /** Optional CTA (e.g. Add to cart) */
1954
- renderCTA?: () => React__default.ReactNode;
1955
- className?: string;
1956
- style?: React__default.CSSProperties;
2396
+ interface SuggestionsDropdownCompositionProps extends Omit<SuggestionsProviderProps, 'children'> {
2397
+ /** Show recent searches when query is empty */
2398
+ showRecentSearches?: boolean;
2399
+ /** Show trending list */
2400
+ showTrending?: boolean;
2401
+ /** Show categories/filtered tabs */
2402
+ showTabs?: boolean;
2403
+ /** Show product grid */
2404
+ showProducts?: boolean;
2405
+ /** SearchInput placeholder */
2406
+ placeholder?: string;
1957
2407
  }
1958
- declare function ProductInfo({ title, description, price, currency, renderVariantSelector, renderCTA, className, style, }: ProductInfoProps): React__default.JSX.Element;
2408
+ declare function SuggestionsDropdownComposition({ showRecentSearches, showTrending, showTabs, showProducts, placeholder, ...providerProps }: SuggestionsDropdownCompositionProps): React__default.JSX.Element;
1959
2409
 
1960
2410
  /**
1961
- * ProductRecommendationsrelated / frequently bought (primitive)
2411
+ * ImageZoomzoom on hover and click (Amazon-style magnifier + lightbox)
1962
2412
  *
1963
- * Renders a section of recommended items (generic ItemGrid or product list).
1964
- * Pass items and onItemClick; or wrap SectionSearchProvider with preset query for "related".
1965
- * For use on individual product page.
2413
+ * Supports three zoom modes:
2414
+ * - hover: Magnified view in a separate panel on the right (Amazon style)
2415
+ * - lens: Magnifying glass that follows cursor
2416
+ * - click: Full-screen lightbox modal
1966
2417
  */
1967
2418
 
1968
- interface ProductRecommendationsProps {
1969
- title?: string;
1970
- items: GenericItem[] | unknown[];
1971
- onItemClick?: (item: unknown, index: number) => void;
1972
- maxItems?: number;
1973
- columns?: number;
2419
+ type ImageZoomMode = 'hover' | 'lens' | 'click' | 'both';
2420
+ interface ImageZoomProps {
2421
+ src: string;
2422
+ alt?: string;
2423
+ mode?: ImageZoomMode;
2424
+ zoomLevel?: number;
1974
2425
  className?: string;
1975
2426
  style?: React__default.CSSProperties;
1976
- renderItem?: (item: unknown, index: number) => React__default.ReactNode;
2427
+ /** Show zoom indicator icon */
2428
+ showZoomIndicator?: boolean;
2429
+ /** Lens size in pixels (for lens mode) */
2430
+ lensSize?: number;
2431
+ /** Zoom panel size (for hover mode) */
2432
+ zoomPanelSize?: {
2433
+ width: number;
2434
+ height: number;
2435
+ };
2436
+ /** Multiple images for lightbox carousel */
2437
+ images?: string[];
2438
+ /** Current image index (for multi-image support) */
2439
+ currentIndex?: number;
1977
2440
  }
1978
- declare function ProductRecommendations({ title, items, onItemClick, maxItems, columns, className, style, renderItem, }: ProductRecommendationsProps): React__default.JSX.Element | null;
2441
+ declare function ImageZoom({ src, alt, mode, zoomLevel, className, style, showZoomIndicator, lensSize, zoomPanelSize, images, currentIndex, }: ImageZoomProps): React__default.JSX.Element;
1979
2442
 
1980
2443
  /**
1981
- * Shared Types for Query Suggestions Components
2444
+ * ImageDisplay configurable multi-image display (primitive)
1982
2445
  *
1983
- * Data-agnostic types that allow clients to map their own field names
2446
+ * Variants: single, carousel, hover, thumbStrip, thumbList. Use in ItemCard,
2447
+ * ProductCard, ProductGallery. Overridable via className/style.
1984
2448
  */
1985
2449
 
1986
- /** Maps client's data fields to component expected fields */
1987
- interface SuggestionFieldMapping {
1988
- /** Field path for suggestion text (e.g., "query", "searchTerm", "text") */
1989
- query: string;
1990
- /** Field path for suggestion count/popularity */
1991
- count?: string;
1992
- /** Field path for object ID */
1993
- id?: string;
1994
- /** Field path for categories array */
1995
- categories?: string;
1996
- /** Field path for highlighted text */
1997
- highlighted?: string;
1998
- /** Custom field mappings */
1999
- custom?: Record<string, string>;
2000
- }
2001
- /** Maps client's product fields to component expected fields */
2002
- interface ProductFieldMapping {
2003
- /** Field path for product ID */
2004
- id: string;
2005
- /** Field path for product title/name */
2006
- title: string;
2007
- /** Field path for product image URL */
2008
- image?: string;
2009
- /** Field path for product price */
2010
- price?: string;
2011
- /** Field path for original/compare price */
2012
- comparePrice?: string;
2013
- /** Field path for product URL */
2014
- url?: string;
2015
- /** Field path for brand name */
2016
- brand?: string;
2017
- /** Field path for category */
2018
- category?: string;
2019
- /** Field path for rating */
2020
- rating?: string;
2021
- /** Field path for review count */
2022
- reviewCount?: string;
2023
- /** Field path for discount percentage */
2024
- discount?: string;
2025
- /** Field path for availability/in stock */
2026
- inStock?: string;
2027
- /** Field path for currency */
2028
- currency?: string;
2029
- /** Custom field mappings */
2030
- custom?: Record<string, string>;
2031
- }
2032
- /** Maps client's category/tab fields */
2033
- interface CategoryFieldMapping {
2034
- id: string;
2035
- label: string;
2036
- count?: string;
2037
- icon?: string;
2038
- image?: string;
2039
- }
2040
- /** Maps client's brand fields */
2041
- interface BrandFieldMapping {
2042
- id?: string;
2043
- name: string;
2044
- logo?: string;
2045
- count?: string;
2046
- }
2047
- type DropdownLayout = 'list' | 'two-column' | 'three-column' | 'grid' | 'hero' | 'full-width' | 'mobile-sheet' | 'overlay';
2048
- type ProductCardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2049
- type ProductCardStyle = 'minimal' | 'standard' | 'detailed' | 'compact' | 'horizontal';
2050
- /** Available dropdown variants */
2051
- type SuggestionDropdownVariant$1 = 'amazon' | 'google' | 'pinterest' | 'spotlight' | 'shopify' | 'mobile-sheet' | 'minimal';
2052
- interface VisualConfig {
2053
- /** Overall dropdown layout */
2054
- layout?: DropdownLayout;
2055
- /** Show/hide shadows */
2056
- shadows?: boolean;
2057
- /** Border radius (px or CSS value) */
2058
- borderRadius?: number | string;
2059
- /** Animation style */
2060
- animation?: 'none' | 'fade' | 'slide' | 'scale' | 'spring';
2061
- /** Animation duration in ms */
2062
- animationDuration?: number;
2063
- /** Blur background when open */
2064
- backdropBlur?: boolean;
2065
- /** Show dividers between sections */
2066
- showDividers?: boolean;
2067
- /** Compact mode (reduced padding) */
2068
- compact?: boolean;
2069
- }
2070
- type SectionType = 'suggestions' | 'recent' | 'trending' | 'products' | 'categories' | 'brands' | 'collections' | 'pages' | 'custom';
2071
- interface SectionConfig {
2072
- /** Section identifier */
2073
- id: SectionType | string;
2074
- /** Section title (can be ReactNode for custom rendering) */
2075
- title?: string | ReactNode;
2076
- /** Whether section is enabled */
2077
- enabled?: boolean;
2078
- /** Maximum items to show */
2079
- maxItems?: number;
2080
- /** Section display order (lower = higher) */
2081
- order?: number;
2082
- /** Section-specific layout override */
2083
- layout?: 'list' | 'grid' | 'horizontal-scroll' | 'chips';
2084
- /** Number of columns for grid layout */
2085
- columns?: number;
2086
- /** Show "View All" link */
2087
- showViewAll?: boolean;
2088
- /** View All link URL or handler */
2089
- viewAllLink?: string;
2090
- /** Custom CSS class */
2450
+ type ImageDisplayVariant = 'single' | 'carousel' | 'hover' | 'thumbStrip' | 'thumbList';
2451
+ interface ImageDisplayProps {
2452
+ images: string[];
2453
+ variant?: ImageDisplayVariant;
2454
+ alt?: string;
2091
2455
  className?: string;
2092
- /** Custom styles */
2093
- style?: CSSProperties;
2094
- /** Custom renderer for entire section */
2095
- render?: (data: any[], config: SectionConfig) => ReactNode;
2096
- /** Custom renderer for individual items */
2097
- renderItem?: (item: any, index: number) => ReactNode;
2098
- /** Empty state message */
2099
- emptyMessage?: string;
2100
- /** Icon for section header */
2101
- icon?: ReactNode;
2102
- }
2103
- interface ProductDisplayConfig {
2104
- /** Card size */
2105
- size?: ProductCardSize;
2106
- /** Card style */
2107
- style?: ProductCardStyle;
2108
- /** Show product image */
2109
- showImage?: boolean;
2110
- /** Image aspect ratio */
2111
- imageAspectRatio?: '1:1' | '4:3' | '3:4' | '16:9' | 'auto';
2112
- /** Show price */
2113
- showPrice?: boolean;
2114
- /** Show compare/original price */
2115
- showComparePrice?: boolean;
2116
- /** Show discount badge */
2117
- showDiscount?: boolean;
2118
- /** Show brand */
2119
- showBrand?: boolean;
2120
- /** Show rating */
2121
- showRating?: boolean;
2122
- /** Show stock status */
2123
- showStock?: boolean;
2124
- /** Show add to cart button */
2125
- showAddToCart?: boolean;
2126
- /** Currency symbol */
2127
- currency?: string;
2128
- /** Currency position */
2129
- currencyPosition?: 'before' | 'after';
2130
- /** Decimal places for price */
2131
- priceDecimals?: number;
2132
- /** Truncate title after N lines */
2133
- titleLines?: number;
2134
- /** Hover effect */
2135
- hoverEffect?: 'none' | 'lift' | 'glow' | 'scale' | 'border';
2136
- /** Image placeholder */
2137
- imagePlaceholder?: ReactNode;
2138
- /** Lazy load images */
2139
- lazyLoadImages?: boolean;
2140
- }
2141
- interface SuggestionDisplayConfig {
2142
- /** Show search icon */
2143
- showIcon?: boolean;
2144
- /** Custom icon */
2145
- icon?: ReactNode;
2146
- /** Show hit count */
2147
- showCount?: boolean;
2148
- /** Show categories inline */
2149
- showCategories?: boolean;
2150
- /** Max categories to show */
2151
- maxCategories?: number;
2152
- /** Highlight matching text */
2153
- highlightMatches?: boolean;
2154
- /** Highlight style */
2155
- highlightStyle?: CSSProperties;
2156
- /** Show arrow on hover */
2157
- showArrow?: boolean;
2158
- /** Category click behavior */
2159
- categoryClickable?: boolean;
2456
+ style?: React__default.CSSProperties;
2457
+ carouselAutoplay?: boolean;
2458
+ carouselIntervalMs?: number;
2459
+ /** Enable zoom functionality */
2460
+ enableZoom?: boolean;
2461
+ /** Zoom mode: 'hover' (Amazon-style), 'lens', 'click' (lightbox), 'both' (hover + click) */
2462
+ zoomMode?: ImageZoomMode;
2463
+ /** Zoom magnification level (2 = 200%, 3 = 300%) */
2464
+ zoomLevel?: number;
2465
+ /** Show navigation dots for carousel */
2466
+ showDots?: boolean;
2160
2467
  }
2161
- interface DropdownThemeConfig {
2162
- /** Light/dark mode */
2163
- mode?: 'light' | 'dark' | 'auto';
2164
- /** Primary brand color */
2165
- primaryColor?: string;
2166
- /** Background color */
2167
- backgroundColor?: string;
2168
- /** Surface color (cards, sections) */
2169
- surfaceColor?: string;
2170
- /** Text color */
2468
+ declare function ImageDisplay({ images, variant, alt, className, style, carouselAutoplay, carouselIntervalMs, enableZoom, zoomMode, zoomLevel, showDots, }: ImageDisplayProps): React__default.JSX.Element;
2469
+
2470
+ /**
2471
+ * PriceDisplay reusable price display primitive
2472
+ *
2473
+ * Handles single price, compare price with strikethrough, discount percentage,
2474
+ * and price range display.
2475
+ */
2476
+
2477
+ interface PriceDisplayProps {
2478
+ price?: number;
2479
+ comparePrice?: number;
2480
+ priceRange?: PriceRange | null;
2481
+ currency?: string;
2482
+ currencyPosition?: 'before' | 'after';
2483
+ priceDecimals?: number;
2484
+ showDiscount?: boolean;
2485
+ className?: string;
2486
+ style?: React__default.CSSProperties;
2487
+ }
2488
+ declare function PriceDisplay({ price, comparePrice, priceRange, currency, currencyPosition, priceDecimals, showDiscount, className, style, }: PriceDisplayProps): React__default.JSX.Element | null;
2489
+
2490
+ /**
2491
+ * BadgeList – renders product badges (sale, new, sold out, custom)
2492
+ */
2493
+
2494
+ interface BadgeListProps {
2495
+ badges: ProductBadge[];
2496
+ maxBadges?: number;
2497
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inline';
2498
+ className?: string;
2499
+ style?: React__default.CSSProperties;
2500
+ }
2501
+ declare function BadgeList({ badges, maxBadges, position, className, style, }: BadgeListProps): React__default.JSX.Element | null;
2502
+
2503
+ /**
2504
+ * RatingDisplay – star rating display with review count
2505
+ *
2506
+ * Supports multiple variants: stars-only, compact, full, inline.
2507
+ * Can be read-only (display) or interactive (for reviews).
2508
+ */
2509
+
2510
+ type RatingVariant = 'stars-only' | 'compact' | 'full' | 'inline';
2511
+ type RatingSize = 'small' | 'medium' | 'large';
2512
+ interface RatingDisplayProps {
2513
+ /** Rating value (0-5) */
2514
+ rating: number;
2515
+ /** Total number of reviews */
2516
+ reviewCount?: number;
2517
+ /** Display variant */
2518
+ variant?: RatingVariant;
2519
+ /** Size of stars */
2520
+ size?: RatingSize;
2521
+ /** Maximum rating (default: 5) */
2522
+ maxRating?: number;
2523
+ /** Show decimal rating number */
2524
+ showNumeric?: boolean;
2525
+ /** Show half stars */
2526
+ showHalfStars?: boolean;
2527
+ /** Interactive mode (for leaving reviews) */
2528
+ interactive?: boolean;
2529
+ /** Callback when rating is clicked (interactive mode) */
2530
+ onRatingChange?: (rating: number) => void;
2531
+ /** Custom star color */
2532
+ starColor?: string;
2533
+ /** Custom empty star color */
2534
+ emptyStarColor?: string;
2535
+ /** Custom text color */
2171
2536
  textColor?: string;
2172
- /** Secondary text color */
2173
- textSecondaryColor?: string;
2174
- /** Border color */
2175
- borderColor?: string;
2176
- /** Hover background */
2177
- hoverColor?: string;
2178
- /** Highlight/match color */
2179
- highlightColor?: string;
2180
- /** Success color (in stock, etc.) */
2181
- successColor?: string;
2182
- /** Error color (out of stock, etc.) */
2183
- errorColor?: string;
2184
- /** Font family */
2185
- fontFamily?: string;
2186
- /** Base font size */
2187
- fontSize?: number | string;
2188
- /** Border radius */
2189
- borderRadius?: number | string;
2190
- /** Box shadow */
2191
- boxShadow?: string;
2192
- /** Custom CSS variables */
2193
- cssVariables?: Record<string, string>;
2537
+ /** Show review count in parentheses */
2538
+ showReviewCount?: boolean;
2539
+ /** Custom review count format */
2540
+ reviewCountFormat?: (count: number) => string;
2541
+ className?: string;
2542
+ style?: React__default.CSSProperties;
2194
2543
  }
2195
- interface AnalyticsConfig {
2196
- /** Enable analytics */
2197
- enabled?: boolean;
2198
- /** Track suggestion clicks */
2199
- trackSuggestionClicks?: boolean;
2200
- /** Track product clicks */
2201
- trackProductClicks?: boolean;
2202
- /** Track impressions */
2203
- trackImpressions?: boolean;
2204
- /** Impression debounce time (ms) */
2205
- impressionDebounce?: number;
2206
- /** Track category clicks */
2207
- trackCategoryClicks?: boolean;
2208
- /** Track brand clicks */
2209
- trackBrandClicks?: boolean;
2210
- /** Track search submissions */
2211
- trackSearchSubmit?: boolean;
2212
- /** Custom analytics tags */
2213
- tags?: string[];
2214
- /** User ID for personalization */
2215
- userId?: string;
2216
- /** Session ID */
2217
- sessionId?: string;
2218
- /** Custom event handler */
2219
- onEvent?: (eventType: string, data: any) => void;
2544
+ declare function RatingDisplay({ rating, reviewCount, variant, size, maxRating, showNumeric, showHalfStars, interactive, onRatingChange, starColor, emptyStarColor, textColor, showReviewCount, reviewCountFormat, className, style, }: RatingDisplayProps): React__default.JSX.Element | null;
2545
+
2546
+ /**
2547
+ * VariantSwatches inline variant indicators for card display
2548
+ *
2549
+ * Shows color dots, size labels, and "+N more" overflow for compact card views.
2550
+ */
2551
+
2552
+ interface VariantSwatchesProps {
2553
+ options: ProductOption[];
2554
+ /** Which option names to show (default: all) */
2555
+ visibleOptions?: string[];
2556
+ /** Max values per option before "+N more" (default: 5) */
2557
+ maxValues?: number;
2558
+ /** Map option value names to CSS color strings */
2559
+ colorMap?: Record<string, string>;
2560
+ /** Currently selected value per option (e.g., { Color: 'Black', Size: 'M' }) */
2561
+ selectedValues?: Record<string, string>;
2562
+ /** Product variants for availability checking */
2563
+ variants?: ProductVariant[];
2564
+ /** Show availability cross-out for unavailable combos (default: true) */
2565
+ showAvailability?: boolean;
2566
+ onSwatchHover?: (optionName: string, value: string) => void;
2567
+ onSwatchClick?: (optionName: string, value: string) => void;
2568
+ className?: string;
2569
+ style?: React__default.CSSProperties;
2220
2570
  }
2221
- interface DropdownEventHandlers<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> {
2222
- /** Suggestion selected */
2223
- onSuggestionSelect?: (suggestion: TSuggestion, index: number) => void;
2224
- /** Product clicked */
2225
- onProductClick?: (product: TProduct, index: number) => void;
2226
- /** Category clicked */
2227
- onCategoryClick?: (category: TCategory, suggestion?: TSuggestion) => void;
2228
- /** Brand clicked */
2229
- onBrandClick?: (brand: TBrand) => void;
2230
- /** Tab/filter changed */
2231
- onTabChange?: (tabId: string, tab?: any) => void;
2232
- /** Recent search clicked */
2233
- onRecentClick?: (query: string) => void;
2234
- /** Recent search removed */
2235
- onRecentRemove?: (query: string) => void;
2236
- /** Clear all recent searches */
2237
- onRecentClearAll?: () => void;
2238
- /** View all clicked */
2239
- onViewAll?: (section: SectionType | string) => void;
2240
- /** Search submitted */
2241
- onSearchSubmit?: (query: string) => void;
2242
- /** Dropdown opened */
2243
- onOpen?: () => void;
2244
- /** Dropdown closed */
2245
- onClose?: () => void;
2246
- /** Keyboard navigation */
2247
- onNavigate?: (direction: 'up' | 'down' | 'left' | 'right', index: number) => void;
2248
- /** Add to cart clicked (if enabled) */
2249
- onAddToCart?: (product: TProduct) => void;
2571
+ declare function VariantSwatches({ options, visibleOptions, maxValues, colorMap, selectedValues, variants, showAvailability, onSwatchHover, onSwatchClick, className, style, }: VariantSwatchesProps): React__default.JSX.Element | null;
2572
+
2573
+ /**
2574
+ * VariantSelector – full variant selector for product detail pages
2575
+ *
2576
+ * Three render modes per option:
2577
+ * - swatch: color circles (auto-detected for "Color" option or when colorMap provided)
2578
+ * - button: rectangular buttons (default for most options)
2579
+ * - dropdown: <select> for options with many values
2580
+ */
2581
+
2582
+ interface VariantSelectorProps {
2583
+ options: ProductOption[];
2584
+ variants: ProductVariant[];
2585
+ selections: Record<string, string>;
2586
+ onSelectionChange: (optionName: string, value: string) => void;
2587
+ /** Override render mode per option name */
2588
+ optionRenderModes?: Record<string, 'swatch' | 'button' | 'dropdown'>;
2589
+ /** Auto-switch to dropdown when values exceed this count (default: 8) */
2590
+ dropdownThreshold?: number;
2591
+ /** Map value names to CSS colors */
2592
+ colorMap?: Record<string, string>;
2593
+ /** Show availability cross-out for unavailable combos */
2594
+ showAvailability?: boolean;
2595
+ /** Currently matched variant (for display) */
2596
+ selectedVariant?: ProductVariant | null;
2597
+ className?: string;
2598
+ style?: React__default.CSSProperties;
2250
2599
  }
2251
- interface AccessibilityConfig {
2252
- /** ARIA label for dropdown */
2253
- ariaLabel?: string;
2254
- /** ARIA labelledby */
2255
- ariaLabelledBy?: string;
2256
- /** Announce selection to screen readers */
2257
- announceSelection?: boolean;
2258
- /** Custom announcement text */
2259
- getAnnouncementText?: (item: any, type: string) => string;
2260
- /** Keyboard navigation enabled */
2261
- keyboardNavigation?: boolean;
2262
- /** Focus trap (keep focus within dropdown) */
2263
- focusTrap?: boolean;
2264
- /** Auto focus first item */
2265
- autoFocus?: boolean;
2266
- /** Close on escape */
2267
- closeOnEscape?: boolean;
2268
- /** Close on click outside */
2269
- closeOnClickOutside?: boolean;
2600
+ declare function VariantSelector({ options, variants, selections, onSelectionChange, optionRenderModes, dropdownThreshold, colorMap, showAvailability, selectedVariant: _selectedVariant, className, style, }: VariantSelectorProps): React__default.JSX.Element | null;
2601
+
2602
+ /**
2603
+ * withAnalytics – HOC that wraps any React component to inject analytics tracking
2604
+ */
2605
+
2606
+ interface WithAnalyticsConfig {
2607
+ /** Track clicks on the component */
2608
+ trackClick?: boolean;
2609
+ /** Track impressions (visibility) */
2610
+ trackImpression?: boolean;
2611
+ /** Custom event name for click */
2612
+ clickEventName?: string;
2613
+ /** Extract product/item data from props */
2614
+ getProductFromProps?: (props: any) => ProductItem | null;
2615
+ /** Extract position from props */
2616
+ getPositionFromProps?: (props: any) => number;
2270
2617
  }
2271
- interface BaseDropdownProps<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> extends DropdownEventHandlers<TSuggestion, TProduct, TCategory, TBrand> {
2272
- /** Current search query */
2618
+ interface WithAnalyticsInjectedProps {
2619
+ seekoraClient?: SeekoraClient;
2620
+ seekoraContext?: SearchContext | Partial<SearchContext>;
2621
+ }
2622
+ declare function withAnalytics<P extends object>(Component: React__default.ComponentType<P>, config?: WithAnalyticsConfig): React__default.ComponentType<P & WithAnalyticsInjectedProps>;
2623
+
2624
+ /**
2625
+ * AnalyticsProvider – context + delegated event listener for data-seekora-* attribute-based analytics
2626
+ *
2627
+ * Installs a delegated click listener on a container. Any descendant with
2628
+ * data-seekora-track="click"|"add-to-cart" and data-seekora-product-id="..."
2629
+ * automatically fires analytics events without React wiring.
2630
+ */
2631
+
2632
+ interface AnalyticsProviderProps {
2633
+ client: SeekoraClient;
2634
+ context?: SearchContext | Partial<SearchContext>;
2635
+ children: React__default.ReactNode;
2636
+ }
2637
+ interface AnalyticsContextValue {
2638
+ client: SeekoraClient;
2639
+ context?: SearchContext | Partial<SearchContext>;
2640
+ }
2641
+ declare const useAnalyticsProvider: () => AnalyticsContextValue | null;
2642
+ declare function AnalyticsProvider({ client, context, children }: AnalyticsProviderProps): React__default.JSX.Element;
2643
+
2644
+ /**
2645
+ * SectionSearchProvider – preset query + filter section
2646
+ *
2647
+ * Runs client.search(query, { refinements, hitsPerPage, sortBy }) on mount and when
2648
+ * query/filters change. Does not use global SearchStateManager. Use for menus,
2649
+ * sidebar, front-page blocks (e.g. "New arrivals", "On sale").
2650
+ */
2651
+
2652
+ interface RefinementInput {
2653
+ field: string;
2654
+ value: string;
2655
+ }
2656
+ interface SectionSearchProviderProps {
2657
+ children: React__default.ReactNode;
2273
2658
  query: string;
2274
- /** Whether dropdown is open/visible */
2275
- isOpen?: boolean;
2276
- /** Loading state */
2277
- loading?: boolean;
2278
- /** Error state */
2279
- error?: Error | string | null;
2280
- /** Suggestion items */
2281
- suggestions?: TSuggestion[];
2282
- /** Product items */
2283
- products?: TProduct[];
2284
- /** Category/filter tabs */
2285
- categories?: TCategory[];
2286
- /** Brand items */
2287
- brands?: TBrand[];
2288
- /** Recent searches (strings or objects) */
2289
- recentSearches?: string[] | Array<{
2290
- query: string;
2291
- timestamp?: number;
2292
- }>;
2293
- /** Trending searches */
2294
- trendingSearches?: string[] | TSuggestion[];
2295
- /** Filtered tabs with products */
2296
- filteredTabs?: Array<{
2297
- id: string;
2298
- label: string;
2299
- products?: TProduct[];
2300
- nb_hits?: number;
2301
- filter?: string;
2302
- }>;
2303
- /** Currently active tab ID */
2304
- activeTab?: string;
2305
- /** Map suggestion data fields */
2306
- suggestionFields?: SuggestionFieldMapping;
2307
- /** Map product data fields */
2308
- productFields?: ProductFieldMapping;
2309
- /** Map category data fields */
2310
- categoryFields?: CategoryFieldMapping;
2311
- /** Map brand data fields */
2312
- brandFields?: BrandFieldMapping;
2313
- /** Section configurations */
2314
- sections?: SectionConfig[];
2315
- /** Product display config */
2316
- productDisplay?: ProductDisplayConfig;
2317
- /** Suggestion display config */
2318
- suggestionDisplay?: SuggestionDisplayConfig;
2319
- /** Visual/layout config */
2320
- visual?: VisualConfig;
2321
- /** Theme config */
2322
- theme?: DropdownThemeConfig;
2323
- /** Analytics config */
2324
- analytics?: AnalyticsConfig;
2325
- /** Accessibility config */
2326
- accessibility?: AccessibilityConfig;
2327
- /** Dropdown width */
2328
- width?: string | number;
2329
- /** Dropdown max height */
2330
- maxHeight?: string | number;
2331
- /** Dropdown min height */
2332
- minHeight?: string | number;
2333
- /** Z-index */
2334
- zIndex?: number;
2335
- /** Root CSS class */
2659
+ refinements?: RefinementInput[];
2660
+ maxItems?: number;
2661
+ sortBy?: string;
2662
+ enabled?: boolean;
2663
+ sectionId?: string;
2664
+ }
2665
+ declare function SectionSearchProvider({ children, query, refinements, maxItems, sortBy, enabled, sectionId, }: SectionSearchProviderProps): React__default.JSX.Element;
2666
+
2667
+ /**
2668
+ * SectionSearchContext – preset query/filter section state
2669
+ *
2670
+ * For menus, sidebar, front-page blocks. Independent of main search state.
2671
+ */
2672
+
2673
+ interface SectionSearchContextValue {
2674
+ items: unknown[];
2675
+ loading: boolean;
2676
+ error: Error | null;
2677
+ totalCount: number;
2678
+ sectionId?: string;
2679
+ trackClick: (item: unknown, position: number) => void;
2680
+ }
2681
+ declare function useSectionSearchContext(): SectionSearchContextValue;
2682
+
2683
+ /**
2684
+ * SectionItemGrid – generic grid of items from SectionSearchProvider (primitive)
2685
+ */
2686
+
2687
+ interface SectionItemGridProps {
2688
+ columns?: number;
2689
+ maxItems?: number;
2336
2690
  className?: string;
2337
- /** Root inline styles */
2338
- style?: CSSProperties;
2339
- /** CSS classes for parts */
2340
- classNames?: Partial<DropdownClassNames>;
2341
- /** Inline styles for parts */
2342
- styles?: Partial<DropdownStyles>;
2343
- /** Custom header */
2344
- header?: ReactNode;
2345
- /** Custom footer */
2346
- footer?: ReactNode;
2347
- /** Custom loading state */
2348
- renderLoading?: () => ReactNode;
2349
- /** Custom empty state */
2350
- renderEmpty?: (query: string) => ReactNode;
2351
- /** Custom error state */
2352
- renderError?: (error: Error | string) => ReactNode;
2353
- /** Reference to input element (for focus management) */
2354
- inputRef?: React.RefObject<HTMLInputElement>;
2691
+ style?: React__default.CSSProperties;
2692
+ /** Show loading state when fetching and no previous items (default false: show previous results until new render) */
2693
+ showLoadingState?: boolean;
2694
+ getItemId?: (item: unknown) => string;
2695
+ getItemTitle?: (item: unknown) => string;
2696
+ getItemImage?: (item: unknown) => string | undefined;
2697
+ getItemDescription?: (item: unknown) => string | undefined;
2698
+ getItemUrl?: (item: unknown) => string | undefined;
2699
+ renderItem?: (item: unknown, index: number) => React__default.ReactNode;
2355
2700
  }
2356
- interface DropdownClassNames {
2357
- root: string;
2358
- container: string;
2359
- header: string;
2360
- content: string;
2361
- footer: string;
2362
- section: string;
2363
- sectionHeader: string;
2364
- sectionTitle: string;
2365
- sectionContent: string;
2366
- sectionViewAll: string;
2367
- suggestionsList: string;
2368
- suggestionItem: string;
2369
- suggestionItemActive: string;
2370
- suggestionIcon: string;
2371
- suggestionText: string;
2372
- suggestionHighlight: string;
2373
- suggestionCount: string;
2374
- suggestionCategories: string;
2375
- suggestionCategory: string;
2376
- suggestionArrow: string;
2377
- productsList: string;
2378
- productCard: string;
2379
- productCardHover: string;
2380
- productImage: string;
2381
- productImagePlaceholder: string;
2382
- productInfo: string;
2383
- productTitle: string;
2384
- productBrand: string;
2385
- productPrice: string;
2386
- productComparePrice: string;
2387
- productDiscount: string;
2388
- productRating: string;
2389
- productStock: string;
2390
- productAddToCart: string;
2391
- categoriesList: string;
2392
- categoryItem: string;
2393
- categoryItemActive: string;
2394
- categoryIcon: string;
2395
- categoryLabel: string;
2396
- categoryCount: string;
2397
- brandsList: string;
2398
- brandItem: string;
2399
- brandLogo: string;
2400
- brandName: string;
2401
- recentList: string;
2402
- recentItem: string;
2403
- recentIcon: string;
2404
- recentText: string;
2405
- recentRemove: string;
2406
- recentClearAll: string;
2407
- trendingList: string;
2408
- trendingItem: string;
2409
- trendingIcon: string;
2410
- tabsList: string;
2411
- tabItem: string;
2412
- tabItemActive: string;
2413
- tabCount: string;
2414
- loading: string;
2415
- loadingSpinner: string;
2416
- empty: string;
2417
- emptyIcon: string;
2418
- emptyText: string;
2419
- error: string;
2420
- errorIcon: string;
2421
- errorText: string;
2422
- keyboard: string;
2423
- keyboardHint: string;
2424
- keyboardKey: string;
2701
+ declare function SectionItemGrid({ columns, maxItems, className, style, showLoadingState, getItemId, getItemTitle, getItemImage, getItemDescription, getItemUrl, renderItem, }: SectionItemGridProps): React__default.JSX.Element;
2702
+
2703
+ /**
2704
+ * SectionLoading – loading state for section (primitive)
2705
+ */
2706
+
2707
+ interface SectionLoadingProps {
2708
+ className?: string;
2709
+ style?: React__default.CSSProperties;
2710
+ text?: string;
2425
2711
  }
2426
- interface DropdownStyles {
2427
- root: CSSProperties;
2428
- container: CSSProperties;
2429
- header: CSSProperties;
2430
- content: CSSProperties;
2431
- footer: CSSProperties;
2432
- section: CSSProperties;
2433
- suggestionItem: CSSProperties;
2434
- productCard: CSSProperties;
2435
- categoryItem: CSSProperties;
2436
- brandItem: CSSProperties;
2712
+ declare function SectionLoading({ className, style, text }: SectionLoadingProps): React__default.JSX.Element | null;
2713
+
2714
+ /**
2715
+ * SectionError – error state for section (primitive)
2716
+ */
2717
+
2718
+ interface SectionErrorProps {
2719
+ className?: string;
2720
+ style?: React__default.CSSProperties;
2721
+ render?: (error: Error) => React__default.ReactNode;
2437
2722
  }
2438
- interface DropdownRef {
2439
- /** Get currently active/focused index */
2440
- getActiveIndex: () => number;
2441
- /** Set active index */
2442
- setActiveIndex: (index: number) => void;
2443
- /** Select currently active item */
2444
- selectActive: () => void;
2445
- /** Navigate to next item */
2446
- navigateNext: () => void;
2447
- /** Navigate to previous item */
2448
- navigatePrevious: () => void;
2449
- /** Focus the dropdown */
2450
- focus: () => void;
2451
- /** Close the dropdown */
2452
- close: () => void;
2453
- /** Get active tab ID (if tabs exist) */
2454
- getActiveTab?: () => string | null;
2455
- /** Set active tab */
2456
- setActiveTab?: (tabId: string) => void;
2457
- /** Scroll to item */
2458
- scrollToItem?: (index: number) => void;
2723
+ declare function SectionError({ className, style, render }: SectionErrorProps): React__default.JSX.Element | null;
2724
+
2725
+ /**
2726
+ * ProductGallery product detail image gallery (primitive)
2727
+ *
2728
+ * Uses ImageDisplay with configurable variant (carousel, thumbStrip, etc.).
2729
+ * For use on individual product page.
2730
+ */
2731
+
2732
+ interface ProductGalleryProps {
2733
+ images: string[];
2734
+ variant?: ImageDisplayVariant;
2735
+ alt?: string;
2736
+ className?: string;
2737
+ style?: React__default.CSSProperties;
2738
+ carouselAutoplay?: boolean;
2739
+ carouselIntervalMs?: number;
2740
+ }
2741
+ declare function ProductGallery({ images, variant, alt, className, style, carouselAutoplay, carouselIntervalMs, }: ProductGalleryProps): React__default.JSX.Element;
2742
+
2743
+ /**
2744
+ * ProductInfo – product detail block (primitive)
2745
+ *
2746
+ * Title, description, price, optional variant selector and CTA. Minimal layout;
2747
+ * override with className/style. For use on individual product page.
2748
+ *
2749
+ * When options/variants/selections/onSelectionChange are provided and
2750
+ * renderVariantSelector is NOT provided, renders the built-in VariantSelector.
2751
+ * renderVariantSelector still takes priority as an override.
2752
+ */
2753
+
2754
+ interface ProductInfoProps {
2755
+ title: string;
2756
+ description?: string;
2757
+ price?: number | string;
2758
+ currency?: string;
2759
+ /** Compare/original price for strikethrough display */
2760
+ comparePrice?: number | string;
2761
+ /** Product brand */
2762
+ brand?: string;
2763
+ /** Whether product is available */
2764
+ available?: boolean;
2765
+ /** Badges to display */
2766
+ badges?: ProductBadge[];
2767
+ /** Product option axes (Color, Size, etc.) */
2768
+ options?: ProductOption[];
2769
+ /** Product variants */
2770
+ variants?: ProductVariant[];
2771
+ /** Currently selected variant */
2772
+ selectedVariant?: ProductVariant | null;
2773
+ /** Current option selections */
2774
+ selections?: Record<string, string>;
2775
+ /** Called when an option value is selected */
2776
+ onSelectionChange?: (optionName: string, value: string) => void;
2777
+ /** Optional variant selector override (takes priority over built-in) */
2778
+ renderVariantSelector?: () => React__default.ReactNode;
2779
+ /** Optional CTA (e.g. Add to cart) */
2780
+ renderCTA?: () => React__default.ReactNode;
2781
+ className?: string;
2782
+ style?: React__default.CSSProperties;
2783
+ }
2784
+ declare function ProductInfo({ title, description, price, currency, comparePrice, brand, available, badges, options, variants, selectedVariant: _selectedVariant, selections, onSelectionChange, renderVariantSelector, renderCTA, className, style, }: ProductInfoProps): React__default.JSX.Element;
2785
+
2786
+ /**
2787
+ * ProductRecommendations – related / frequently bought (primitive)
2788
+ *
2789
+ * Renders a section of recommended items (generic ItemGrid or product list).
2790
+ * Pass items and onItemClick; or wrap SectionSearchProvider with preset query for "related".
2791
+ * For use on individual product page.
2792
+ */
2793
+
2794
+ interface ProductRecommendationsProps {
2795
+ title?: string;
2796
+ items: GenericItem[] | unknown[];
2797
+ onItemClick?: (item: unknown, index: number) => void;
2798
+ maxItems?: number;
2799
+ columns?: number;
2800
+ className?: string;
2801
+ style?: React__default.CSSProperties;
2802
+ renderItem?: (item: unknown, index: number) => React__default.ReactNode;
2459
2803
  }
2804
+ declare function ProductRecommendations({ title, items, onItemClick, maxItems, columns, className, style, renderItem, }: ProductRecommendationsProps): React__default.JSX.Element | null;
2460
2805
 
2461
2806
  /**
2462
2807
  * MinimalDropdown - Ultra-Clean Minimalist Style
@@ -2805,6 +3150,12 @@ declare const extractProduct: (item: any, mapping?: ProductFieldMapping) => {
2805
3150
  discount: any;
2806
3151
  inStock: any;
2807
3152
  currency: any;
3153
+ images: any;
3154
+ originalPrice: any;
3155
+ available: any;
3156
+ options: any;
3157
+ variants: any;
3158
+ tags: any;
2808
3159
  _raw: any;
2809
3160
  };
2810
3161
  /**
@@ -2840,6 +3191,36 @@ declare const highlightText: (text: string, query: string, options?: {
2840
3191
  className?: string;
2841
3192
  style?: CSSProperties;
2842
3193
  }) => string;
3194
+ /**
3195
+ * Extract badges from product tags (Shopify convention: "badge:new", "badge:limited")
3196
+ * and auto-generate sale/soldOut badges from product data.
3197
+ */
3198
+ declare const extractBadges: (tags?: string[], product?: {
3199
+ price?: number;
3200
+ original_price?: number;
3201
+ compare_at_price?: number;
3202
+ available?: boolean;
3203
+ }) => ProductBadge[];
3204
+ /**
3205
+ * Compute min/max price from variants. Returns null if all variants have the same price.
3206
+ */
3207
+ declare const getPriceRange: (variants?: ProductVariant[]) => PriceRange | null;
3208
+ /**
3209
+ * Format a price range like "$54.00 - $72.00"
3210
+ */
3211
+ declare const formatPriceRange: (range: PriceRange, config?: Pick<ProductDisplayConfig, "currency" | "currencyPosition" | "priceDecimals">) => string;
3212
+ /**
3213
+ * Given current selections, return which values for an option are still available
3214
+ * based on variant availability.
3215
+ */
3216
+ declare const getAvailableValuesForOption: (optionName: string, options: ProductOption[], variants: ProductVariant[], selections: Record<string, string>) => {
3217
+ value: string;
3218
+ available: boolean;
3219
+ }[];
3220
+ /**
3221
+ * Find the exact variant matching all selected options.
3222
+ */
3223
+ declare const findVariantBySelections: (options: ProductOption[], variants: ProductVariant[], selections: Record<string, string>) => ProductVariant | null;
2843
3224
  declare const getRecentSearches: (storeId?: string) => string[];
2844
3225
  declare const addRecentSearch: (query: string, storeId?: string) => string[];
2845
3226
  declare const removeRecentSearch: (query: string, storeId?: string) => string[];
@@ -3523,6 +3904,82 @@ declare function useNaturalLanguageFilters(options?: NaturalLanguageFiltersOptio
3523
3904
  */
3524
3905
  declare function formatParsedFilters(filters: ParsedFilter[]): string;
3525
3906
 
3907
+ /**
3908
+ * useVariantSelection – manages variant selection state
3909
+ *
3910
+ * Single source of truth for variant interactions on product pages.
3911
+ * Cards display variants passively; product pages use this hook.
3912
+ */
3913
+
3914
+ interface UseVariantSelectionOptions {
3915
+ options?: ProductOption[];
3916
+ variants?: ProductVariant[];
3917
+ initialSelections?: Record<string, string>;
3918
+ onVariantChange?: (variant: ProductVariant | null, selections: Record<string, string>) => void;
3919
+ }
3920
+ interface UseVariantSelectionReturn {
3921
+ selections: Record<string, string>;
3922
+ setSelection: (optionName: string, value: string) => void;
3923
+ resetSelections: () => void;
3924
+ selectedVariant: ProductVariant | null;
3925
+ availableValues: Record<string, {
3926
+ value: string;
3927
+ available: boolean;
3928
+ }[]>;
3929
+ isComplete: boolean;
3930
+ effectivePrice: number | null;
3931
+ effectiveComparePrice: number | null;
3932
+ }
3933
+ declare function useVariantSelection({ options, variants, initialSelections, onVariantChange, }?: UseVariantSelectionOptions): UseVariantSelectionReturn;
3934
+
3935
+ /**
3936
+ * useProductAnalytics – analytics event binding hook for custom components
3937
+ *
3938
+ * Returns event handler props ready to spread onto any element, plus imperative
3939
+ * tracking methods. Builds on existing useAnalytics infrastructure.
3940
+ */
3941
+
3942
+ interface UseProductAnalyticsOptions {
3943
+ client: SeekoraClient;
3944
+ product: ProductItem;
3945
+ position?: number;
3946
+ section?: string;
3947
+ tabId?: string;
3948
+ query?: string;
3949
+ context?: SearchContext | Partial<SearchContext>;
3950
+ enabled?: boolean;
3951
+ }
3952
+ interface UseProductAnalyticsReturn {
3953
+ /** Spread onto any clickable element to track product click */
3954
+ clickProps: {
3955
+ onClick: (e?: React.MouseEvent) => void;
3956
+ 'data-seekora-product-id': string;
3957
+ 'data-seekora-position': number;
3958
+ };
3959
+ /** Spread onto any element to track variant selection */
3960
+ variantSelectProps: (optionName: string, value: string) => {
3961
+ onClick: (e?: React.MouseEvent) => void;
3962
+ 'data-seekora-variant-option': string;
3963
+ 'data-seekora-variant-value': string;
3964
+ };
3965
+ /** Spread onto any element to track add-to-cart */
3966
+ addToCartProps: (variant?: ProductVariant) => {
3967
+ onClick: (e?: React.MouseEvent) => void;
3968
+ 'data-seekora-action': 'add-to-cart';
3969
+ };
3970
+ /** Spread onto any element to track impression (uses IntersectionObserver) */
3971
+ impressionRef: React.RefCallback<HTMLElement>;
3972
+ /** Imperative: track product click */
3973
+ trackClick: () => void;
3974
+ /** Imperative: track variant select */
3975
+ trackVariantSelect: (optionName: string, value: string) => void;
3976
+ /** Imperative: track add to cart */
3977
+ trackAddToCart: (variant?: ProductVariant) => void;
3978
+ /** Imperative: track custom event with product context */
3979
+ trackCustomEvent: (eventName: string, metadata?: Record<string, any>) => void;
3980
+ }
3981
+ declare function useProductAnalytics({ client, product, position, section, tabId, query, context, enabled, }: UseProductAnalyticsOptions): UseProductAnalyticsReturn;
3982
+
3526
3983
  /**
3527
3984
  * Default Theme
3528
3985
  */
@@ -3660,5 +4117,5 @@ declare function updateSuggestionsStyles(theme: SuggestionsThemeVariables): void
3660
4117
 
3661
4118
  declare const createTheme: (config: ThemeConfig) => _seekora_ai_ui_sdk_types.Theme;
3662
4119
 
3663
- export { AmazonDropdown, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight, HitsPerPage, ImageDisplay, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem$1 as SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsCache, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBrand, extractCategory, extractProduct, extractSuggestion, formatParsedFilters, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, minimalTheme, minimalThemeVariables, parseHighlightMarkup, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext };
3664
- export type { AnalyticsConfig, AnalyticsEventPayload, BaseDropdownProps, BrandFieldMapping, BreadcrumbItem, BreadcrumbProps, BreadcrumbTheme, CategoriesTabsProps, CategoryFieldMapping, ClearRefinementsProps, ClearRefinementsTheme, DocSearchAction, DocSearchButtonProps, DocSearchHit, DocSearchProps, DocSearchResponse, DocSearchState, DocSearchSuggestion, DocSearchSuggestionsResponse, DocSearchTranslations, DropdownClassNames, DropdownEventHandlers, DropdownPanelProps, DropdownRef, DropdownThemeConfig, FederatedDropdownProps, FederatedDropdownRef, FrequentlyBoughtTogetherProps, GenericItem, HierarchicalMenuItem, HierarchicalMenuProps, HierarchicalMenuTheme, HighlightMarkupOptions, HighlightProps, HighlightTheme, HitsPerPageItem, HitsPerPageProps, HitsPerPageTheme, ImageDisplayProps, ImageDisplayVariant, InfiniteHitsProps, InfiniteHitsTheme, ImageDisplayVariant$1 as ItemCardImageVariant, ItemCardProps, ItemGridProps, MobileFiltersButtonProps, MobileFiltersProps, MobileFiltersTheme, NaturalLanguageFiltersOptions, NaturalLanguageResult, NavigableItem, ParsedFilter, ProductCardImageVariant, ProductCardProps, ProductClickEventData, ProductDisplayConfig, ProductFieldMapping, ProductGalleryProps, ProductGridProps, ProductInfoProps, ProductRecommendationsProps, QuerySuggestionsDropdownProps, QuerySuggestionsDropdownRef, QuerySuggestionsProps, QuerySuggestionsTheme, RangeSliderProps, RangeSliderTheme, RecentSearchesListProps, RecentlyViewedProps, RecommendationItem, RecommendationTheme, RefinementInput, RelatedProductsProps, ResponsiveState, RichQuerySuggestionsProps, RichQuerySuggestionsRef, SearchBarProps, SearchBarTheme, SearchBarWithSuggestionsProps, SearchBarWithSuggestionsRef, SearchInputProps, SearchProviderProps, SearchResultsProps, SearchResultsTheme, SearchSource, SectionConfig, SectionErrorProps, SectionItemGridProps, SectionLoadingProps, SectionSearchContextValue, SectionSearchProviderProps, SmartSuggestion, SmartSuggestionsOptions, SnippetProps, SnippetTheme, SuggestionClickEventData, SuggestionDisplayConfig, SuggestionDropdownVariant, SuggestionFieldMapping, SuggestionImpressionEventData, SuggestionItemProps, SuggestionListProps, SuggestionSearchBarProps, SuggestionSearchBarRef, SuggestionsContextValue, SuggestionsDropdownCompositionProps, SuggestionsErrorProps, SuggestionsLoadingProps, SuggestionsProviderProps, SuggestionsThemeVariables, TrendingItemsProps, TrendingListProps, UseAnalyticsOptions, UseAnalyticsReturn, UseSeekoraSearchOptions$1 as UseDocSearchSeekoraSearchOptions, UseSeekoraSearchResult as UseDocSearchSeekoraSearchResult, UseQuerySuggestionsEnhancedOptions, UseQuerySuggestionsEnhancedReturn, UseSmartSuggestionsReturn, UseSuggestionsAnalyticsOptions, UseSuggestionsAnalyticsReturn };
4120
+ export { ActionButtons, AmazonDropdown, AnalyticsProvider, BadgeList, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight, HitsPerPage, ImageDisplay, ImageZoom, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, PriceDisplay, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RatingDisplay, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem$1 as SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsCache, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, VariantSelector, VariantSwatches, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBadges, extractBrand, extractCategory, extractProduct, extractSuggestion, findVariantBySelections, formatParsedFilters, formatPriceRange, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getAvailableValuesForOption, getPriceRange, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, minimalTheme, minimalThemeVariables, parseHighlightMarkup, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useAnalyticsProvider, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useProductAnalytics, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext, useVariantSelection, withAnalytics };
4121
+ export type { ActionButton, ActionButtonType, ActionButtonsProps, AnalyticsConfig, AnalyticsEventPayload, AnalyticsProviderProps, BadgeListProps, BaseDropdownProps, BrandFieldMapping, BreadcrumbItem, BreadcrumbProps, BreadcrumbTheme, CategoriesTabsProps, CategoryFieldMapping, ClearRefinementsProps, ClearRefinementsTheme, DocSearchAction, DocSearchButtonProps, DocSearchHit, DocSearchProps, DocSearchResponse, DocSearchState, DocSearchSuggestion, DocSearchSuggestionsResponse, DocSearchTranslations, DropdownClassNames, DropdownEventHandlers, DropdownPanelProps, DropdownRef, DropdownThemeConfig, FederatedDropdownProps, FederatedDropdownRef, FrequentlyBoughtTogetherProps, GenericItem, HierarchicalMenuItem, HierarchicalMenuProps, HierarchicalMenuTheme, HighlightMarkupOptions, HighlightProps, HighlightTheme, HitsPerPageItem, HitsPerPageProps, HitsPerPageTheme, ImageDisplayProps, ImageDisplayVariant, ImageZoomMode, ImageZoomProps, InfiniteHitsProps, InfiniteHitsTheme, ImageDisplayVariant$1 as ItemCardImageVariant, ItemCardProps, ItemGridProps, MobileFiltersButtonProps, MobileFiltersProps, MobileFiltersTheme, NaturalLanguageFiltersOptions, NaturalLanguageResult, NavigableItem, ParsedFilter, PriceDisplayProps, ProductCardImageVariant, ProductCardProps, ProductClickEventData, ProductDisplayConfig, ProductFieldMapping, ProductGalleryProps, ProductGridProps, ProductInfoProps, ProductRecommendationsProps, QuerySuggestionsDropdownProps, QuerySuggestionsDropdownRef, QuerySuggestionsProps, QuerySuggestionsTheme, RangeSliderProps, RangeSliderTheme, RatingDisplayProps, RatingSize, RatingVariant, RecentSearchesListProps, RecentlyViewedProps, RecommendationItem, RecommendationTheme, RefinementInput, RelatedProductsProps, ResponsiveState, RichQuerySuggestionsProps, RichQuerySuggestionsRef, SearchBarProps, SearchBarTheme, SearchBarWithSuggestionsProps, SearchBarWithSuggestionsRef, SearchInputProps, SearchProviderProps, SearchResultsProps, SearchResultsTheme, SearchSource, SectionConfig, SectionErrorProps, SectionItemGridProps, SectionLoadingProps, SectionSearchContextValue, SectionSearchProviderProps, SmartSuggestion, SmartSuggestionsOptions, SnippetProps, SnippetTheme, SuggestionClickEventData, SuggestionDisplayConfig, SuggestionDropdownVariant, SuggestionFieldMapping, SuggestionImpressionEventData, SuggestionItemProps, SuggestionListProps, SuggestionSearchBarProps, SuggestionSearchBarRef, SuggestionsContextValue, SuggestionsDropdownCompositionProps, SuggestionsErrorProps, SuggestionsLoadingProps, SuggestionsProviderProps, SuggestionsThemeVariables, TrendingItemsProps, TrendingListProps, UseAnalyticsOptions, UseAnalyticsReturn, UseSeekoraSearchOptions$1 as UseDocSearchSeekoraSearchOptions, UseSeekoraSearchResult as UseDocSearchSeekoraSearchResult, UseProductAnalyticsOptions, UseProductAnalyticsReturn, UseQuerySuggestionsEnhancedOptions, UseQuerySuggestionsEnhancedReturn, UseSmartSuggestionsReturn, UseSuggestionsAnalyticsOptions, UseSuggestionsAnalyticsReturn, UseVariantSelectionOptions, UseVariantSelectionReturn, VariantSelectorProps, VariantSwatchesProps, WithAnalyticsConfig, WithAnalyticsInjectedProps };