@seekora-ai/ui-sdk-react 1.0.0

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 (169) hide show
  1. package/dist/components/Breadcrumb.d.ts +43 -0
  2. package/dist/components/Breadcrumb.d.ts.map +1 -0
  3. package/dist/components/Breadcrumb.js +119 -0
  4. package/dist/components/ClearRefinements.d.ts +42 -0
  5. package/dist/components/ClearRefinements.d.ts.map +1 -0
  6. package/dist/components/ClearRefinements.js +80 -0
  7. package/dist/components/CurrentRefinements.d.ts +41 -0
  8. package/dist/components/CurrentRefinements.d.ts.map +1 -0
  9. package/dist/components/CurrentRefinements.js +83 -0
  10. package/dist/components/Facets.d.ts +53 -0
  11. package/dist/components/Facets.d.ts.map +1 -0
  12. package/dist/components/Facets.js +195 -0
  13. package/dist/components/FederatedDropdown.d.ts +92 -0
  14. package/dist/components/FederatedDropdown.d.ts.map +1 -0
  15. package/dist/components/FederatedDropdown.js +510 -0
  16. package/dist/components/HierarchicalMenu.d.ts +55 -0
  17. package/dist/components/HierarchicalMenu.d.ts.map +1 -0
  18. package/dist/components/HierarchicalMenu.js +168 -0
  19. package/dist/components/Highlight.d.ts +51 -0
  20. package/dist/components/Highlight.d.ts.map +1 -0
  21. package/dist/components/Highlight.js +155 -0
  22. package/dist/components/HitsPerPage.d.ts +41 -0
  23. package/dist/components/HitsPerPage.d.ts.map +1 -0
  24. package/dist/components/HitsPerPage.js +72 -0
  25. package/dist/components/InfiniteHits.d.ts +56 -0
  26. package/dist/components/InfiniteHits.d.ts.map +1 -0
  27. package/dist/components/InfiniteHits.js +181 -0
  28. package/dist/components/MobileFilters.d.ts +71 -0
  29. package/dist/components/MobileFilters.d.ts.map +1 -0
  30. package/dist/components/MobileFilters.js +242 -0
  31. package/dist/components/Pagination.d.ts +44 -0
  32. package/dist/components/Pagination.d.ts.map +1 -0
  33. package/dist/components/Pagination.js +142 -0
  34. package/dist/components/QuerySuggestions.d.ts +38 -0
  35. package/dist/components/QuerySuggestions.d.ts.map +1 -0
  36. package/dist/components/QuerySuggestions.js +86 -0
  37. package/dist/components/QuerySuggestionsDropdown.d.ts +86 -0
  38. package/dist/components/QuerySuggestionsDropdown.d.ts.map +1 -0
  39. package/dist/components/QuerySuggestionsDropdown.js +395 -0
  40. package/dist/components/RangeInput.d.ts +58 -0
  41. package/dist/components/RangeInput.d.ts.map +1 -0
  42. package/dist/components/RangeInput.js +203 -0
  43. package/dist/components/RangeSlider.d.ts +51 -0
  44. package/dist/components/RangeSlider.d.ts.map +1 -0
  45. package/dist/components/RangeSlider.js +193 -0
  46. package/dist/components/Recommendations.d.ts +90 -0
  47. package/dist/components/Recommendations.d.ts.map +1 -0
  48. package/dist/components/Recommendations.js +270 -0
  49. package/dist/components/RichQuerySuggestions.d.ts +77 -0
  50. package/dist/components/RichQuerySuggestions.d.ts.map +1 -0
  51. package/dist/components/RichQuerySuggestions.js +492 -0
  52. package/dist/components/SearchBar.d.ts +40 -0
  53. package/dist/components/SearchBar.d.ts.map +1 -0
  54. package/dist/components/SearchBar.js +217 -0
  55. package/dist/components/SearchBarWithSuggestions.d.ts +99 -0
  56. package/dist/components/SearchBarWithSuggestions.d.ts.map +1 -0
  57. package/dist/components/SearchBarWithSuggestions.js +275 -0
  58. package/dist/components/SearchLayout.d.ts +35 -0
  59. package/dist/components/SearchLayout.d.ts.map +1 -0
  60. package/dist/components/SearchLayout.js +56 -0
  61. package/dist/components/SearchProvider.d.ts +28 -0
  62. package/dist/components/SearchProvider.d.ts.map +1 -0
  63. package/dist/components/SearchProvider.js +43 -0
  64. package/dist/components/SearchResults.d.ts +51 -0
  65. package/dist/components/SearchResults.d.ts.map +1 -0
  66. package/dist/components/SearchResults.js +485 -0
  67. package/dist/components/SortBy.d.ts +44 -0
  68. package/dist/components/SortBy.d.ts.map +1 -0
  69. package/dist/components/SortBy.js +61 -0
  70. package/dist/components/Stats.d.ts +37 -0
  71. package/dist/components/Stats.d.ts.map +1 -0
  72. package/dist/components/Stats.js +52 -0
  73. package/dist/components/suggestions/AmazonDropdown.d.ts +30 -0
  74. package/dist/components/suggestions/AmazonDropdown.d.ts.map +1 -0
  75. package/dist/components/suggestions/AmazonDropdown.js +529 -0
  76. package/dist/components/suggestions/GoogleDropdown.d.ts +31 -0
  77. package/dist/components/suggestions/GoogleDropdown.d.ts.map +1 -0
  78. package/dist/components/suggestions/GoogleDropdown.js +370 -0
  79. package/dist/components/suggestions/MinimalDropdown.d.ts +24 -0
  80. package/dist/components/suggestions/MinimalDropdown.d.ts.map +1 -0
  81. package/dist/components/suggestions/MinimalDropdown.js +314 -0
  82. package/dist/components/suggestions/MobileSheetDropdown.d.ts +31 -0
  83. package/dist/components/suggestions/MobileSheetDropdown.d.ts.map +1 -0
  84. package/dist/components/suggestions/MobileSheetDropdown.js +485 -0
  85. package/dist/components/suggestions/PinterestDropdown.d.ts +29 -0
  86. package/dist/components/suggestions/PinterestDropdown.d.ts.map +1 -0
  87. package/dist/components/suggestions/PinterestDropdown.js +450 -0
  88. package/dist/components/suggestions/ShopifyDropdown.d.ts +27 -0
  89. package/dist/components/suggestions/ShopifyDropdown.d.ts.map +1 -0
  90. package/dist/components/suggestions/ShopifyDropdown.js +451 -0
  91. package/dist/components/suggestions/SpotlightDropdown.d.ts +33 -0
  92. package/dist/components/suggestions/SpotlightDropdown.d.ts.map +1 -0
  93. package/dist/components/suggestions/SpotlightDropdown.js +547 -0
  94. package/dist/components/suggestions/SuggestionSearchBar.d.ts +123 -0
  95. package/dist/components/suggestions/SuggestionSearchBar.d.ts.map +1 -0
  96. package/dist/components/suggestions/SuggestionSearchBar.js +652 -0
  97. package/dist/components/suggestions/index.d.ts +37 -0
  98. package/dist/components/suggestions/index.d.ts.map +1 -0
  99. package/dist/components/suggestions/index.js +59 -0
  100. package/dist/components/suggestions/styles/index.d.ts +11 -0
  101. package/dist/components/suggestions/styles/index.d.ts.map +1 -0
  102. package/dist/components/suggestions/styles/index.js +289 -0
  103. package/dist/components/suggestions/styles/responsive.d.ts +107 -0
  104. package/dist/components/suggestions/styles/responsive.d.ts.map +1 -0
  105. package/dist/components/suggestions/styles/responsive.js +237 -0
  106. package/dist/components/suggestions/types.d.ts +489 -0
  107. package/dist/components/suggestions/types.d.ts.map +1 -0
  108. package/dist/components/suggestions/types.js +6 -0
  109. package/dist/components/suggestions/utils.d.ts +213 -0
  110. package/dist/components/suggestions/utils.d.ts.map +1 -0
  111. package/dist/components/suggestions/utils.js +514 -0
  112. package/dist/hooks/useAnalytics.d.ts +20 -0
  113. package/dist/hooks/useAnalytics.d.ts.map +1 -0
  114. package/dist/hooks/useAnalytics.js +62 -0
  115. package/dist/hooks/useNaturalLanguageFilters.d.ts +48 -0
  116. package/dist/hooks/useNaturalLanguageFilters.d.ts.map +1 -0
  117. package/dist/hooks/useNaturalLanguageFilters.js +221 -0
  118. package/dist/hooks/useQuerySuggestions.d.ts +21 -0
  119. package/dist/hooks/useQuerySuggestions.d.ts.map +1 -0
  120. package/dist/hooks/useQuerySuggestions.js +68 -0
  121. package/dist/hooks/useQuerySuggestionsEnhanced.d.ts +114 -0
  122. package/dist/hooks/useQuerySuggestionsEnhanced.d.ts.map +1 -0
  123. package/dist/hooks/useQuerySuggestionsEnhanced.js +376 -0
  124. package/dist/hooks/useSearchState.d.ts +35 -0
  125. package/dist/hooks/useSearchState.d.ts.map +1 -0
  126. package/dist/hooks/useSearchState.js +68 -0
  127. package/dist/hooks/useSeekoraSearch.d.ts +20 -0
  128. package/dist/hooks/useSeekoraSearch.d.ts.map +1 -0
  129. package/dist/hooks/useSeekoraSearch.js +63 -0
  130. package/dist/hooks/useSmartSuggestions.d.ts +55 -0
  131. package/dist/hooks/useSmartSuggestions.d.ts.map +1 -0
  132. package/dist/hooks/useSmartSuggestions.js +236 -0
  133. package/dist/hooks/useSuggestionsAnalytics.d.ts +91 -0
  134. package/dist/hooks/useSuggestionsAnalytics.d.ts.map +1 -0
  135. package/dist/hooks/useSuggestionsAnalytics.js +226 -0
  136. package/dist/index.d.ts +80 -0
  137. package/dist/index.d.ts.map +1 -0
  138. package/dist/index.js +86 -0
  139. package/dist/index.umd.js +1 -0
  140. package/dist/src/index.d.ts +2849 -0
  141. package/dist/src/index.esm.js +11679 -0
  142. package/dist/src/index.esm.js.map +1 -0
  143. package/dist/src/index.js +11761 -0
  144. package/dist/src/index.js.map +1 -0
  145. package/dist/themes/createTheme.d.ts +8 -0
  146. package/dist/themes/createTheme.d.ts.map +1 -0
  147. package/dist/themes/createTheme.js +10 -0
  148. package/dist/themes/dark.d.ts +6 -0
  149. package/dist/themes/dark.d.ts.map +1 -0
  150. package/dist/themes/dark.js +34 -0
  151. package/dist/themes/default.d.ts +6 -0
  152. package/dist/themes/default.d.ts.map +1 -0
  153. package/dist/themes/default.js +71 -0
  154. package/dist/themes/mergeThemes.d.ts +7 -0
  155. package/dist/themes/mergeThemes.d.ts.map +1 -0
  156. package/dist/themes/mergeThemes.js +6 -0
  157. package/dist/themes/minimal.d.ts +6 -0
  158. package/dist/themes/minimal.d.ts.map +1 -0
  159. package/dist/themes/minimal.js +34 -0
  160. package/dist/themes/suggestions.d.ts +216 -0
  161. package/dist/themes/suggestions.d.ts.map +1 -0
  162. package/dist/themes/suggestions.js +546 -0
  163. package/dist/themes/types.d.ts +7 -0
  164. package/dist/themes/types.d.ts.map +1 -0
  165. package/dist/themes/types.js +6 -0
  166. package/dist/types/index.d.ts +33 -0
  167. package/dist/types/index.d.ts.map +1 -0
  168. package/dist/types/index.js +4 -0
  169. package/package.json +65 -0
@@ -0,0 +1,2849 @@
1
+ import * as React$1 from 'react';
2
+ import React__default, { ReactNode, CSSProperties } from 'react';
3
+ import { SearchOptions, SearchResponse, SeekoraClient, SearchContext, DataTypesEventPayload } from '@seekora-ai/search-sdk';
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$2, 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';
7
+ import { SearchStateManagerConfig, SearchStateManager, HighlightPart, SearchState } from '@seekora-ai/ui-sdk-core';
8
+ export { mergeThemes } from '@seekora-ai/ui-sdk-core';
9
+
10
+ /**
11
+ * SearchBar Component
12
+ *
13
+ * Interactive search input component with query suggestions support
14
+ */
15
+
16
+ interface SearchBarTheme {
17
+ container?: string;
18
+ input?: string;
19
+ inputFocused?: string;
20
+ suggestionsContainer?: string;
21
+ suggestionItem?: string;
22
+ suggestionItemHover?: string;
23
+ suggestionItemActive?: string;
24
+ loadingIndicator?: string;
25
+ }
26
+ interface SearchBarProps {
27
+ placeholder?: string;
28
+ showSuggestions?: boolean;
29
+ debounceMs?: number;
30
+ minQueryLength?: number;
31
+ maxSuggestions?: number;
32
+ onSearch?: (query: string, results: any) => void;
33
+ onQueryChange?: (query: string) => void;
34
+ onSuggestionSelect?: (suggestion: string) => void;
35
+ onSearchStateChange?: (state: {
36
+ results: any;
37
+ loading: boolean;
38
+ error: Error | null;
39
+ }) => void;
40
+ searchOptions?: Omit<SearchOptions, 'q'>;
41
+ className?: string;
42
+ style?: React__default.CSSProperties;
43
+ theme?: SearchBarTheme;
44
+ renderSuggestion?: (suggestion: string, index: number) => React__default.ReactNode;
45
+ renderLoading?: () => React__default.ReactNode;
46
+ }
47
+ declare const SearchBar: React__default.FC<SearchBarProps>;
48
+
49
+ /**
50
+ * SearchResults Component
51
+ *
52
+ * Displays search results with customizable rendering
53
+ * Includes keyboard navigation support (arrow keys, Enter to select)
54
+ */
55
+
56
+ interface SearchResultsTheme {
57
+ container?: string;
58
+ header?: string;
59
+ resultsList?: string;
60
+ resultItem?: string;
61
+ resultItemHover?: string;
62
+ resultTitle?: string;
63
+ resultDescription?: string;
64
+ resultImage?: string;
65
+ resultPrice?: string;
66
+ emptyState?: string;
67
+ loadingState?: string;
68
+ errorState?: string;
69
+ pagination?: string;
70
+ }
71
+ interface SearchResultsProps {
72
+ results?: SearchResponse | null;
73
+ loading?: boolean;
74
+ error?: Error | null;
75
+ onResultClick?: (result: ResultItem, index: number) => void;
76
+ renderResult?: (result: ResultItem, index: number, isActive?: boolean) => React__default.ReactNode;
77
+ renderEmpty?: () => React__default.ReactNode;
78
+ renderLoading?: () => React__default.ReactNode;
79
+ renderError?: (error: Error) => React__default.ReactNode;
80
+ className?: string;
81
+ style?: React__default.CSSProperties;
82
+ theme?: SearchResultsTheme;
83
+ itemsPerPage?: number;
84
+ showPagination?: boolean;
85
+ /** Display mode: 'list' (default), 'card', or 'grid' */
86
+ viewMode?: ViewMode;
87
+ /** Field mapping configuration for extracting data from results */
88
+ fieldMapping?: FieldMapping;
89
+ /** Function to extract results array from the response (if custom structure) */
90
+ extractResults?: (response: any) => any[];
91
+ /** Enable keyboard navigation (arrow keys, Enter to select) */
92
+ enableKeyboardNavigation?: boolean;
93
+ /** Auto-focus the results container */
94
+ autoFocus?: boolean;
95
+ }
96
+ declare const SearchResults: React__default.FC<SearchResultsProps>;
97
+
98
+ /**
99
+ * SearchProvider Component
100
+ *
101
+ * Provides Seekora client and context to child components
102
+ */
103
+
104
+ interface SearchContextValue {
105
+ client: SeekoraClient;
106
+ theme: Theme;
107
+ enableAnalytics: boolean;
108
+ autoTrackSearch: boolean;
109
+ stateManager: SearchStateManager;
110
+ }
111
+ interface SearchProviderProps {
112
+ client: SeekoraClient;
113
+ theme?: ThemeConfig;
114
+ enableAnalytics?: boolean;
115
+ autoTrackSearch?: boolean;
116
+ stateManager?: SearchStateManagerConfig;
117
+ children: ReactNode;
118
+ }
119
+ declare const SearchProvider: React__default.FC<SearchProviderProps>;
120
+ declare const useSearchContext: () => SearchContextValue;
121
+
122
+ /**
123
+ * Stats Component
124
+ *
125
+ * Displays search statistics (total results, processing time, etc.)
126
+ */
127
+
128
+ interface StatsTheme {
129
+ container?: string;
130
+ text?: string;
131
+ highlight?: string;
132
+ separator?: string;
133
+ }
134
+ interface StatsProps {
135
+ /** Search results response */
136
+ results?: SearchResponse | null;
137
+ /** Custom render function */
138
+ renderStats?: (stats: {
139
+ totalResults: number;
140
+ processingTime?: number;
141
+ query?: string;
142
+ }) => React__default.ReactNode;
143
+ /** Custom className */
144
+ className?: string;
145
+ /** Custom styles */
146
+ style?: React__default.CSSProperties;
147
+ /** Custom theme */
148
+ theme?: StatsTheme;
149
+ /** Show processing time */
150
+ showProcessingTime?: boolean;
151
+ /** Show query */
152
+ showQuery?: boolean;
153
+ /** Custom separator between stats */
154
+ separator?: string;
155
+ }
156
+ declare const Stats: React__default.FC<StatsProps>;
157
+
158
+ /**
159
+ * Pagination Component
160
+ *
161
+ * Displays pagination controls for search results
162
+ */
163
+
164
+ interface PaginationTheme {
165
+ container?: string;
166
+ list?: string;
167
+ item?: string;
168
+ itemActive?: string;
169
+ itemDisabled?: string;
170
+ link?: string;
171
+ ellipsis?: string;
172
+ }
173
+ interface PaginationProps {
174
+ /** Search results response */
175
+ results?: SearchResponse | null;
176
+ /** Current page number (1-indexed) */
177
+ currentPage?: number;
178
+ /** Items per page */
179
+ itemsPerPage?: number;
180
+ /** Total number of pages */
181
+ totalPages?: number;
182
+ /** Callback when page changes */
183
+ onPageChange?: (page: number) => void;
184
+ /** Maximum number of page buttons to show */
185
+ maxPages?: number;
186
+ /** Show first/last page buttons */
187
+ showFirstLast?: boolean;
188
+ /** Show previous/next buttons */
189
+ showPrevNext?: boolean;
190
+ /** Custom render function for page button */
191
+ renderPageButton?: (page: number, isActive: boolean, isDisabled: boolean) => React__default.ReactNode;
192
+ /** Custom className */
193
+ className?: string;
194
+ /** Custom styles */
195
+ style?: React__default.CSSProperties;
196
+ /** Custom theme */
197
+ theme?: PaginationTheme;
198
+ }
199
+ declare const Pagination: React__default.FC<PaginationProps>;
200
+
201
+ /**
202
+ * SortBy Component
203
+ *
204
+ * Displays sort options for search results
205
+ * Integrates with SearchStateManager for automatic state sync
206
+ */
207
+
208
+ interface SortOption {
209
+ value: string;
210
+ label: string;
211
+ }
212
+ interface SortByTheme {
213
+ container?: string;
214
+ select?: string;
215
+ option?: string;
216
+ }
217
+ interface SortByProps {
218
+ /** Available sort options */
219
+ options: SortOption[];
220
+ /** Current sort value (controlled mode - overrides StateManager) */
221
+ value?: string;
222
+ /** Default sort value */
223
+ defaultValue?: string;
224
+ /** Callback when sort changes */
225
+ onSortChange?: (value: string) => void;
226
+ /** Custom render function for select */
227
+ renderSelect?: (props: {
228
+ value: string;
229
+ onChange: (e: React__default.ChangeEvent<HTMLSelectElement>) => void;
230
+ options: SortOption[];
231
+ }) => React__default.ReactNode;
232
+ /** Custom className */
233
+ className?: string;
234
+ /** Custom styles */
235
+ style?: React__default.CSSProperties;
236
+ /** Custom theme */
237
+ theme?: SortByTheme;
238
+ /** Placeholder text */
239
+ placeholder?: string;
240
+ /** Whether to sync with SearchStateManager (default: true) */
241
+ syncWithState?: boolean;
242
+ }
243
+ declare const SortBy: React__default.FC<SortByProps>;
244
+
245
+ /**
246
+ * Facets Component
247
+ *
248
+ * Displays facet filters for search results
249
+ */
250
+
251
+ interface FacetItem {
252
+ value: string;
253
+ count: number;
254
+ selected?: boolean;
255
+ }
256
+ interface Facet {
257
+ field: string;
258
+ label?: string;
259
+ items: FacetItem[];
260
+ }
261
+ interface FacetsTheme {
262
+ container?: string;
263
+ facet?: string;
264
+ facetHeader?: string;
265
+ facetTitle?: string;
266
+ facetList?: string;
267
+ facetItem?: string;
268
+ facetItemActive?: string;
269
+ facetItemCount?: string;
270
+ facetItemLabel?: string;
271
+ checkbox?: string;
272
+ }
273
+ interface FacetsProps {
274
+ /** Search results response */
275
+ results?: SearchResponse | null;
276
+ /** Custom facets data */
277
+ facets?: Facet[];
278
+ /** Callback when facet is selected/deselected */
279
+ onFacetChange?: (field: string, value: string, selected: boolean) => void;
280
+ /** Custom render function for facet */
281
+ renderFacet?: (facet: Facet, index: number) => React__default.ReactNode;
282
+ /** Custom render function for facet item */
283
+ renderFacetItem?: (item: FacetItem, facet: Facet, index: number) => React__default.ReactNode;
284
+ /** Maximum number of items to show per facet */
285
+ maxItems?: number;
286
+ /** Show "Show more" button */
287
+ showMore?: boolean;
288
+ /** Custom className */
289
+ className?: string;
290
+ /** Custom styles */
291
+ style?: React__default.CSSProperties;
292
+ /** Custom theme */
293
+ theme?: FacetsTheme;
294
+ }
295
+ declare const Facets: React__default.FC<FacetsProps>;
296
+
297
+ /**
298
+ * CurrentRefinements Component
299
+ *
300
+ * Displays currently active filters/refinements with ability to clear them
301
+ */
302
+
303
+ interface Refinement {
304
+ field: string;
305
+ label?: string;
306
+ value: string;
307
+ displayValue?: string;
308
+ }
309
+ interface CurrentRefinementsTheme {
310
+ container?: string;
311
+ list?: string;
312
+ item?: string;
313
+ label?: string;
314
+ value?: string;
315
+ clearButton?: string;
316
+ clearAllButton?: string;
317
+ }
318
+ interface CurrentRefinementsProps {
319
+ /** Current refinements */
320
+ refinements?: Refinement[];
321
+ /** Callback when a refinement is cleared */
322
+ onRefinementClear?: (field: string, value: string) => void;
323
+ /** Callback when all refinements are cleared */
324
+ onClearAll?: () => void;
325
+ /** Custom render function for refinement */
326
+ renderRefinement?: (refinement: Refinement, index: number) => React__default.ReactNode;
327
+ /** Show "Clear all" button */
328
+ showClearAll?: boolean;
329
+ /** Custom className */
330
+ className?: string;
331
+ /** Custom styles */
332
+ style?: React__default.CSSProperties;
333
+ /** Custom theme */
334
+ theme?: CurrentRefinementsTheme;
335
+ }
336
+ declare const CurrentRefinements: React__default.FC<CurrentRefinementsProps>;
337
+
338
+ /**
339
+ * ClearRefinements Component
340
+ *
341
+ * A standalone button to clear all active refinements/filters
342
+ * Integrates with SearchStateManager for automatic state sync
343
+ */
344
+
345
+ interface ClearRefinementsTheme {
346
+ root?: string;
347
+ button?: string;
348
+ buttonDisabled?: string;
349
+ }
350
+ interface ClearRefinementsProps {
351
+ /** Button text when there are refinements to clear */
352
+ clearsQuery?: boolean;
353
+ /** Whether clicking should also clear the search query */
354
+ resetLabel?: string;
355
+ /** Button text shown when there are no refinements */
356
+ disabledLabel?: string;
357
+ /** Fields to include (if not specified, all fields are included) */
358
+ includedFields?: string[];
359
+ /** Fields to exclude from clearing */
360
+ excludedFields?: string[];
361
+ /** Callback when refinements are cleared */
362
+ onClear?: () => void;
363
+ /** Custom render function */
364
+ renderButton?: (props: {
365
+ canClear: boolean;
366
+ onClick: () => void;
367
+ disabled: boolean;
368
+ }) => React__default.ReactNode;
369
+ /** Custom className */
370
+ className?: string;
371
+ /** Custom styles */
372
+ style?: React__default.CSSProperties;
373
+ /** Custom theme */
374
+ theme?: ClearRefinementsTheme;
375
+ /** Whether to hide when there are no refinements */
376
+ hideWhenEmpty?: boolean;
377
+ }
378
+ declare const ClearRefinements: React__default.FC<ClearRefinementsProps>;
379
+
380
+ /**
381
+ * SearchLayout Component
382
+ *
383
+ * Provides a layout structure for search interfaces with sidebar and main content
384
+ */
385
+
386
+ interface SearchLayoutTheme {
387
+ container?: string;
388
+ sidebar?: string;
389
+ main?: string;
390
+ header?: string;
391
+ footer?: string;
392
+ }
393
+ interface SearchLayoutProps {
394
+ /** Content to render in the sidebar (filters, facets, etc.) */
395
+ sidebar?: React__default.ReactNode;
396
+ /** Content to render in the main area (results, etc.) */
397
+ children: React__default.ReactNode;
398
+ /** Header content */
399
+ header?: React__default.ReactNode;
400
+ /** Footer content */
401
+ footer?: React__default.ReactNode;
402
+ /** Sidebar width */
403
+ sidebarWidth?: string;
404
+ /** Custom className */
405
+ className?: string;
406
+ /** Custom styles */
407
+ style?: React__default.CSSProperties;
408
+ /** Custom theme */
409
+ theme?: SearchLayoutTheme;
410
+ /** Show sidebar on mobile */
411
+ showSidebarOnMobile?: boolean;
412
+ }
413
+ declare const SearchLayout: React__default.FC<SearchLayoutProps>;
414
+
415
+ /**
416
+ * RangeInput Component
417
+ *
418
+ * Displays a range input for filtering numeric values (e.g., price range)
419
+ * Integrates with SearchStateManager for automatic state sync
420
+ */
421
+
422
+ interface RangeInputTheme {
423
+ container?: string;
424
+ label?: string;
425
+ inputGroup?: string;
426
+ input?: string;
427
+ separator?: string;
428
+ button?: string;
429
+ }
430
+ interface RangeInputProps {
431
+ /** Field name for the range filter */
432
+ field: string;
433
+ /** Label for the range input */
434
+ label?: string;
435
+ /** Minimum value */
436
+ min?: number;
437
+ /** Maximum value */
438
+ max?: number;
439
+ /** Current minimum value (controlled mode) */
440
+ currentMin?: number;
441
+ /** Current maximum value (controlled mode) */
442
+ currentMax?: number;
443
+ /** Step value for inputs */
444
+ step?: number;
445
+ /** Callback when range changes */
446
+ onRangeChange?: (min: number | undefined, max: number | undefined) => void;
447
+ /** Custom render function */
448
+ renderRangeInput?: (props: {
449
+ min: number | undefined;
450
+ max: number | undefined;
451
+ onMinChange: (value: number | undefined) => void;
452
+ onMaxChange: (value: number | undefined) => void;
453
+ onApply: () => void;
454
+ }) => React__default.ReactNode;
455
+ /** Custom className */
456
+ className?: string;
457
+ /** Custom styles */
458
+ style?: React__default.CSSProperties;
459
+ /** Custom theme */
460
+ theme?: RangeInputTheme;
461
+ /** Show apply button */
462
+ showApplyButton?: boolean;
463
+ /** Placeholder text for inputs */
464
+ placeholder?: {
465
+ min?: string;
466
+ max?: string;
467
+ };
468
+ /** Whether to sync with SearchStateManager (default: true) */
469
+ syncWithState?: boolean;
470
+ }
471
+ declare const RangeInput: React__default.FC<RangeInputProps>;
472
+
473
+ /**
474
+ * HitsPerPage Component
475
+ *
476
+ * A dropdown to let users change the number of displayed hits per page
477
+ * Integrates with SearchStateManager for automatic state sync
478
+ */
479
+
480
+ interface HitsPerPageItem {
481
+ value: number;
482
+ label: string;
483
+ default?: boolean;
484
+ }
485
+ interface HitsPerPageTheme {
486
+ root?: string;
487
+ select?: string;
488
+ option?: string;
489
+ }
490
+ interface HitsPerPageProps {
491
+ /** Available items per page options */
492
+ items: HitsPerPageItem[];
493
+ /** Callback when hits per page changes */
494
+ onHitsPerPageChange?: (value: number) => void;
495
+ /** Custom render function for select */
496
+ renderSelect?: (props: {
497
+ value: number;
498
+ onChange: (e: React__default.ChangeEvent<HTMLSelectElement>) => void;
499
+ items: HitsPerPageItem[];
500
+ }) => React__default.ReactNode;
501
+ /** Custom className */
502
+ className?: string;
503
+ /** Custom styles */
504
+ style?: React__default.CSSProperties;
505
+ /** Custom theme */
506
+ theme?: HitsPerPageTheme;
507
+ /** Label text before the select */
508
+ label?: string;
509
+ /** Whether to sync with SearchStateManager (default: true) */
510
+ syncWithState?: boolean;
511
+ }
512
+ declare const HitsPerPage: React__default.FC<HitsPerPageProps>;
513
+
514
+ /**
515
+ * InfiniteHits Component
516
+ *
517
+ * Displays search results with infinite scroll or "Show More" button
518
+ * Accumulates results as user loads more pages
519
+ */
520
+
521
+ interface InfiniteHitsTheme {
522
+ root?: string;
523
+ list?: string;
524
+ item?: string;
525
+ loadMore?: string;
526
+ loadMoreDisabled?: string;
527
+ loading?: string;
528
+ empty?: string;
529
+ sentinel?: string;
530
+ }
531
+ interface InfiniteHitsProps {
532
+ /** Custom render function for each hit */
533
+ renderHit?: (hit: ResultItem, index: number) => React__default.ReactNode;
534
+ /** Custom render for empty state */
535
+ renderEmpty?: () => React__default.ReactNode;
536
+ /** Custom render for loading state */
537
+ renderLoading?: () => React__default.ReactNode;
538
+ /** Custom render for "Show More" button */
539
+ renderShowMore?: (props: {
540
+ isLoading: boolean;
541
+ isLastPage: boolean;
542
+ onClick: () => void;
543
+ }) => React__default.ReactNode;
544
+ /** Whether to show the "Show More" button (default: true) */
545
+ showMoreButton?: boolean;
546
+ /** Whether to use infinite scroll with IntersectionObserver (default: false) */
547
+ useInfiniteScroll?: boolean;
548
+ /** Threshold for IntersectionObserver (default: 0.1) */
549
+ scrollThreshold?: number;
550
+ /** Field mapping for extracting data from hits */
551
+ fieldMapping?: FieldMapping;
552
+ /** Text for "Show More" button */
553
+ showMoreLabel?: string;
554
+ /** Text for loading state */
555
+ loadingLabel?: string;
556
+ /** Callback when a hit is clicked */
557
+ onHitClick?: (hit: ResultItem, index: number) => void;
558
+ /** Custom className */
559
+ className?: string;
560
+ /** Custom styles */
561
+ style?: React__default.CSSProperties;
562
+ /** Custom theme */
563
+ theme?: InfiniteHitsTheme;
564
+ /** Whether to sync with SearchStateManager (default: true) */
565
+ syncWithState?: boolean;
566
+ }
567
+ declare const InfiniteHits: React__default.FC<InfiniteHitsProps>;
568
+
569
+ /**
570
+ * Highlight Component
571
+ *
572
+ * Renders highlighted search result text with matching terms emphasized
573
+ */
574
+
575
+ interface HighlightTheme {
576
+ root?: string;
577
+ highlighted?: string;
578
+ nonHighlighted?: string;
579
+ }
580
+ interface HighlightProps {
581
+ /** The search hit containing highlight data */
582
+ hit: Record<string, any>;
583
+ /** The attribute to highlight */
584
+ attribute: string;
585
+ /** Custom className */
586
+ className?: string;
587
+ /** Custom styles */
588
+ style?: React__default.CSSProperties;
589
+ /** Custom theme */
590
+ theme?: HighlightTheme;
591
+ /** Tag name for root element (default: 'span') */
592
+ tagName?: keyof JSX.IntrinsicElements;
593
+ /** Custom render for highlighted parts */
594
+ renderHighlighted?: (part: HighlightPart, index: number) => React__default.ReactNode;
595
+ /** Custom render for non-highlighted parts */
596
+ renderNonHighlighted?: (part: HighlightPart, index: number) => React__default.ReactNode;
597
+ /** Fallback query for client-side highlighting (when server highlight not available) */
598
+ query?: string;
599
+ }
600
+ declare const Highlight: React__default.FC<HighlightProps>;
601
+ /**
602
+ * Snippet Component
603
+ *
604
+ * Renders a truncated, highlighted excerpt from search results
605
+ */
606
+ interface SnippetTheme extends HighlightTheme {
607
+ ellipsis?: string;
608
+ }
609
+ interface SnippetProps extends Omit<HighlightProps, 'theme'> {
610
+ /** Maximum length of snippet (default: 100) */
611
+ maxLength?: number;
612
+ /** Ellipsis to use when truncating (default: '...') */
613
+ ellipsis?: string;
614
+ /** Custom theme */
615
+ theme?: SnippetTheme;
616
+ }
617
+ declare const Snippet: React__default.FC<SnippetProps>;
618
+
619
+ /**
620
+ * HierarchicalMenu Component
621
+ *
622
+ * Displays a hierarchical menu for nested category navigation
623
+ * Example: Electronics > Phones > iPhone
624
+ */
625
+
626
+ interface HierarchicalMenuItem {
627
+ label: string;
628
+ value: string;
629
+ count?: number;
630
+ isRefined?: boolean;
631
+ data?: HierarchicalMenuItem[];
632
+ }
633
+ interface HierarchicalMenuTheme {
634
+ root?: string;
635
+ list?: string;
636
+ item?: string;
637
+ itemSelected?: string;
638
+ itemParent?: string;
639
+ link?: string;
640
+ label?: string;
641
+ count?: string;
642
+ showMore?: string;
643
+ }
644
+ interface HierarchicalMenuProps {
645
+ /** Attributes for each level of hierarchy (e.g., ['category.lvl0', 'category.lvl1', 'category.lvl2']) */
646
+ attributes: string[];
647
+ /** Separator used in the hierarchical values (default: ' > ') */
648
+ separator?: string;
649
+ /** Maximum number of items to show per level (default: 10) */
650
+ limit?: number;
651
+ /** Show "Show more" button (default: true) */
652
+ showMore?: boolean;
653
+ /** Maximum items when "Show more" is clicked (default: 20) */
654
+ showMoreLimit?: number;
655
+ /** Custom render function for items */
656
+ renderItem?: (item: HierarchicalMenuItem, level: number) => React__default.ReactNode;
657
+ /** Callback when an item is selected */
658
+ onSelect?: (value: string, level: number) => void;
659
+ /** Custom className */
660
+ className?: string;
661
+ /** Custom styles */
662
+ style?: React__default.CSSProperties;
663
+ /** Custom theme */
664
+ theme?: HierarchicalMenuTheme;
665
+ /** Root path (for pre-selecting a category) */
666
+ rootPath?: string | null;
667
+ /** Sort by (default: 'name') */
668
+ sortBy?: 'name' | 'count' | 'isRefined';
669
+ /** Custom facet data (if not using StateManager) */
670
+ items?: HierarchicalMenuItem[];
671
+ }
672
+ declare const HierarchicalMenu: React__default.FC<HierarchicalMenuProps>;
673
+
674
+ /**
675
+ * RangeSlider Component
676
+ *
677
+ * Visual slider for numeric range filtering
678
+ * Alternative to RangeInput for a more interactive UX
679
+ */
680
+
681
+ interface RangeSliderTheme {
682
+ root?: string;
683
+ label?: string;
684
+ slider?: string;
685
+ track?: string;
686
+ trackFilled?: string;
687
+ thumb?: string;
688
+ values?: string;
689
+ value?: string;
690
+ }
691
+ interface RangeSliderProps {
692
+ /** Field name for the range filter */
693
+ field: string;
694
+ /** Label for the slider */
695
+ label?: string;
696
+ /** Minimum value */
697
+ min: number;
698
+ /** Maximum value */
699
+ max: number;
700
+ /** Step value (default: 1) */
701
+ step?: number;
702
+ /** Current minimum value */
703
+ currentMin?: number;
704
+ /** Current maximum value */
705
+ currentMax?: number;
706
+ /** Callback when range changes */
707
+ onRangeChange?: (min: number, max: number) => void;
708
+ /** Format value for display (default: (v) => v.toString()) */
709
+ formatValue?: (value: number) => string;
710
+ /** Custom className */
711
+ className?: string;
712
+ /** Custom styles */
713
+ style?: React__default.CSSProperties;
714
+ /** Custom theme */
715
+ theme?: RangeSliderTheme;
716
+ /** Show current values (default: true) */
717
+ showValues?: boolean;
718
+ /** Whether to sync with SearchStateManager (default: true) */
719
+ syncWithState?: boolean;
720
+ /** Debounce delay for updates (default: 300ms) */
721
+ debounceMs?: number;
722
+ }
723
+ declare const RangeSlider: React__default.FC<RangeSliderProps>;
724
+
725
+ /**
726
+ * Breadcrumb Component
727
+ *
728
+ * Displays the current hierarchical navigation path
729
+ * Allows users to navigate back to parent categories
730
+ */
731
+
732
+ interface BreadcrumbItem {
733
+ label: string;
734
+ value: string;
735
+ }
736
+ interface BreadcrumbTheme {
737
+ root?: string;
738
+ list?: string;
739
+ item?: string;
740
+ link?: string;
741
+ separator?: string;
742
+ current?: string;
743
+ }
744
+ interface BreadcrumbProps {
745
+ /** Attributes for each level of hierarchy */
746
+ attributes: string[];
747
+ /** Separator between items (default: ' > ') */
748
+ separator?: string;
749
+ /** Root label (default: 'Home') */
750
+ rootLabel?: string;
751
+ /** Custom render function for items */
752
+ renderItem?: (item: BreadcrumbItem, index: number, isLast: boolean) => React__default.ReactNode;
753
+ /** Custom render for separator */
754
+ renderSeparator?: () => React__default.ReactNode;
755
+ /** Callback when an item is clicked */
756
+ onNavigate?: (item: BreadcrumbItem | null, index: number) => void;
757
+ /** Custom className */
758
+ className?: string;
759
+ /** Custom styles */
760
+ style?: React__default.CSSProperties;
761
+ /** Custom theme */
762
+ theme?: BreadcrumbTheme;
763
+ /** Custom breadcrumb items (overrides automatic detection) */
764
+ items?: BreadcrumbItem[];
765
+ }
766
+ declare const Breadcrumb: React__default.FC<BreadcrumbProps>;
767
+
768
+ /**
769
+ * MobileFilters Component
770
+ *
771
+ * A full-screen filter drawer optimized for mobile devices
772
+ * Slides in from the side or bottom to display facets and filters
773
+ */
774
+
775
+ interface MobileFiltersTheme {
776
+ overlay?: string;
777
+ drawer?: string;
778
+ header?: string;
779
+ title?: string;
780
+ closeButton?: string;
781
+ content?: string;
782
+ footer?: string;
783
+ applyButton?: string;
784
+ clearButton?: string;
785
+ filterCount?: string;
786
+ }
787
+ interface MobileFiltersProps {
788
+ /** Whether the drawer is open */
789
+ isOpen: boolean;
790
+ /** Callback when drawer should close */
791
+ onClose: () => void;
792
+ /** Callback when filters are applied */
793
+ onApply?: () => void;
794
+ /** Title text */
795
+ title?: string;
796
+ /** Apply button text */
797
+ applyButtonText?: string;
798
+ /** Clear button text */
799
+ clearButtonText?: string;
800
+ /** Position of the drawer */
801
+ position?: 'left' | 'right' | 'bottom';
802
+ /** Children (filter components) */
803
+ children: React__default.ReactNode;
804
+ /** Custom className */
805
+ className?: string;
806
+ /** Custom theme */
807
+ theme?: MobileFiltersTheme;
808
+ /** Show header */
809
+ showHeader?: boolean;
810
+ /** Show footer with apply/clear buttons */
811
+ showFooter?: boolean;
812
+ /** Show filter count badge */
813
+ showFilterCount?: boolean;
814
+ /** Close on backdrop click */
815
+ closeOnBackdropClick?: boolean;
816
+ /** Close on escape key */
817
+ closeOnEscape?: boolean;
818
+ }
819
+ declare const MobileFilters: React__default.FC<MobileFiltersProps>;
820
+ /**
821
+ * MobileFiltersButton Component
822
+ *
823
+ * A button to toggle the MobileFilters drawer
824
+ */
825
+ interface MobileFiltersButtonProps {
826
+ /** Callback when clicked */
827
+ onClick: () => void;
828
+ /** Button text */
829
+ text?: string;
830
+ /** Show filter count */
831
+ showCount?: boolean;
832
+ /** Custom className */
833
+ className?: string;
834
+ /** Custom styles */
835
+ style?: React__default.CSSProperties;
836
+ }
837
+ declare const MobileFiltersButton: React__default.FC<MobileFiltersButtonProps>;
838
+
839
+ /**
840
+ * Recommendation Components
841
+ *
842
+ * Components for displaying product recommendations:
843
+ * - RelatedProducts: Show related items based on a product
844
+ * - TrendingItems: Display trending/popular products
845
+ * - FrequentlyBoughtTogether: Bundle recommendations
846
+ * - RecentlyViewed: User's recently viewed items
847
+ */
848
+
849
+ interface RecommendationItem extends ResultItem {
850
+ [key: string]: any;
851
+ }
852
+ interface RecommendationTheme {
853
+ root?: string;
854
+ title?: string;
855
+ list?: string;
856
+ item?: string;
857
+ image?: string;
858
+ content?: string;
859
+ name?: string;
860
+ price?: string;
861
+ loading?: string;
862
+ empty?: string;
863
+ }
864
+ interface BaseRecommendationProps {
865
+ /** Title for the section */
866
+ title?: string;
867
+ /** Maximum items to show */
868
+ maxItems?: number;
869
+ /** Custom render function for items */
870
+ renderItem?: (item: RecommendationItem, index: number) => React__default.ReactNode;
871
+ /** Callback when item is clicked */
872
+ onItemClick?: (item: RecommendationItem, index: number) => void;
873
+ /** Custom className */
874
+ className?: string;
875
+ /** Custom styles */
876
+ style?: React__default.CSSProperties;
877
+ /** Custom theme */
878
+ theme?: RecommendationTheme;
879
+ /** Layout mode */
880
+ layout?: 'horizontal' | 'grid' | 'list';
881
+ /** Currency symbol for prices */
882
+ currencySymbol?: string;
883
+ }
884
+ interface RelatedProductsProps extends BaseRecommendationProps {
885
+ /** Product ID to get related products for */
886
+ productId: string;
887
+ /** Custom items (if not using API) */
888
+ items?: RecommendationItem[];
889
+ /** Loading state */
890
+ loading?: boolean;
891
+ }
892
+ declare const RelatedProducts: React__default.FC<RelatedProductsProps>;
893
+ interface TrendingItemsProps extends BaseRecommendationProps {
894
+ /** Custom items (if not using API) */
895
+ items?: RecommendationItem[];
896
+ /** Loading state */
897
+ loading?: boolean;
898
+ /** Facet name for trending (if using facet data) */
899
+ facetName?: string;
900
+ }
901
+ declare const TrendingItems: React__default.FC<TrendingItemsProps>;
902
+ interface FrequentlyBoughtTogetherProps extends BaseRecommendationProps {
903
+ /** Product ID to get frequently bought together items for */
904
+ productId: string;
905
+ /** Custom items (if not using API) */
906
+ items?: RecommendationItem[];
907
+ /** Loading state */
908
+ loading?: boolean;
909
+ /** Show "Add all to cart" button */
910
+ showAddAllButton?: boolean;
911
+ /** Callback when "Add all" is clicked */
912
+ onAddAll?: (items: RecommendationItem[]) => void;
913
+ }
914
+ declare const FrequentlyBoughtTogether: React__default.FC<FrequentlyBoughtTogetherProps>;
915
+ interface RecentlyViewedProps extends BaseRecommendationProps {
916
+ /** Storage key for localStorage */
917
+ storageKey?: string;
918
+ /** Custom items (overrides localStorage) */
919
+ items?: RecommendationItem[];
920
+ }
921
+ declare const RecentlyViewed: React__default.FC<RecentlyViewedProps>;
922
+ /**
923
+ * Add item to recently viewed (utility function)
924
+ */
925
+ declare function addToRecentlyViewed(item: RecommendationItem, storageKey?: string, maxItems?: number): void;
926
+
927
+ /**
928
+ * QuerySuggestions Component
929
+ *
930
+ * Standalone component for displaying query suggestions
931
+ */
932
+
933
+ interface SuggestionItem$1 {
934
+ query: string;
935
+ count?: number;
936
+ metadata?: Record<string, any>;
937
+ }
938
+ interface QuerySuggestionsTheme {
939
+ container?: string;
940
+ title?: string;
941
+ suggestionsList?: string;
942
+ suggestionItem?: string;
943
+ suggestionItemHover?: string;
944
+ suggestionItemActive?: string;
945
+ loadingState?: string;
946
+ emptyState?: string;
947
+ }
948
+ interface QuerySuggestionsProps {
949
+ query?: string;
950
+ maxSuggestions?: number;
951
+ debounceMs?: number;
952
+ minQueryLength?: number;
953
+ onSuggestionClick?: (suggestion: string) => void;
954
+ renderSuggestion?: (suggestion: SuggestionItem$1, index: number) => React__default.ReactNode;
955
+ renderLoading?: () => React__default.ReactNode;
956
+ renderEmpty?: () => React__default.ReactNode;
957
+ showTitle?: boolean;
958
+ title?: string;
959
+ className?: string;
960
+ style?: React__default.CSSProperties;
961
+ theme?: QuerySuggestionsTheme;
962
+ }
963
+ declare const QuerySuggestions: React__default.FC<QuerySuggestionsProps>;
964
+
965
+ /**
966
+ * QuerySuggestionsDropdown Component
967
+ *
968
+ * Classic dropdown variant with:
969
+ * - Highlighted matches
970
+ * - Keyboard navigation
971
+ * - Recent searches
972
+ * - Customizable styling
973
+ * - Analytics tracking
974
+ * - Accessibility support
975
+ */
976
+
977
+ interface QuerySuggestionsDropdownProps extends QuerySuggestionsEventHandlers {
978
+ /** Current query string */
979
+ query: string;
980
+ /** Whether the dropdown is visible */
981
+ isOpen?: boolean;
982
+ /** Maximum suggestions to display */
983
+ maxSuggestions?: number;
984
+ /** Minimum query length to trigger suggestions */
985
+ minQueryLength?: number;
986
+ /** Debounce delay in ms */
987
+ debounceMs?: number;
988
+ /** Show recent searches section */
989
+ showRecentSearches?: boolean;
990
+ /** Maximum recent searches to display */
991
+ maxRecentSearches?: number;
992
+ /** Show suggestion counts */
993
+ showCounts?: boolean;
994
+ /** Show loading state */
995
+ showLoading?: boolean;
996
+ /** Show empty state when no results */
997
+ showEmptyState?: boolean;
998
+ /** Highlight configuration */
999
+ highlight?: HighlightConfig;
1000
+ /** Keyboard navigation configuration */
1001
+ keyboardNav?: KeyboardNavConfig;
1002
+ /** Animation configuration */
1003
+ animation?: AnimationConfig;
1004
+ /** Custom class names */
1005
+ classNames?: QuerySuggestionsClassNames;
1006
+ /** Custom CSS styles */
1007
+ style?: React__default.CSSProperties;
1008
+ /** Custom render for suggestion item */
1009
+ renderSuggestion?: (suggestion: SuggestionItem$2, index: number, isActive: boolean, highlight: (text: string) => React__default.ReactNode) => React__default.ReactNode;
1010
+ /** Custom render for recent search item */
1011
+ renderRecentSearch?: (search: RecentSearch, index: number, isActive: boolean) => React__default.ReactNode;
1012
+ /** Custom render for loading state */
1013
+ renderLoading?: () => React__default.ReactNode;
1014
+ /** Custom render for empty state */
1015
+ renderEmpty?: () => React__default.ReactNode;
1016
+ /** Custom footer content */
1017
+ footer?: React__default.ReactNode;
1018
+ /** Position of dropdown */
1019
+ position?: 'absolute' | 'fixed';
1020
+ /** Dropdown width */
1021
+ width?: string | number;
1022
+ /** Z-index for dropdown */
1023
+ zIndex?: number;
1024
+ /** Input element ref for positioning */
1025
+ inputRef?: React__default.RefObject<HTMLInputElement>;
1026
+ /** Close on click outside */
1027
+ closeOnClickOutside?: boolean;
1028
+ /** Close on escape key */
1029
+ closeOnEscape?: boolean;
1030
+ /** ARIA label */
1031
+ ariaLabel?: string;
1032
+ }
1033
+ interface QuerySuggestionsDropdownRef {
1034
+ /** Select the currently active item */
1035
+ selectActive: () => void;
1036
+ /** Navigate to next item */
1037
+ navigateNext: () => void;
1038
+ /** Navigate to previous item */
1039
+ navigatePrevious: () => void;
1040
+ /** Reset selection */
1041
+ resetSelection: () => void;
1042
+ /** Get active index */
1043
+ getActiveIndex: () => number;
1044
+ /** Get total items count */
1045
+ getTotalItems: () => number;
1046
+ }
1047
+ declare const QuerySuggestionsDropdown: React__default.ForwardRefExoticComponent<QuerySuggestionsDropdownProps & React__default.RefAttributes<QuerySuggestionsDropdownRef>>;
1048
+
1049
+ /**
1050
+ * RichQuerySuggestions Component
1051
+ *
1052
+ * Advanced multi-section dropdown with:
1053
+ * - Suggestions with categories
1054
+ * - Trending searches
1055
+ * - Recent searches
1056
+ * - Top searches (popular)
1057
+ * - Related searches
1058
+ * - Configurable sections
1059
+ * - Rich styling options
1060
+ */
1061
+
1062
+ interface RichQuerySuggestionsProps extends QuerySuggestionsEventHandlers {
1063
+ /** Current query string */
1064
+ query: string;
1065
+ /** Whether the dropdown is visible */
1066
+ isOpen?: boolean;
1067
+ /** Section configuration */
1068
+ sections?: DropdownSectionConfig[];
1069
+ /** Maximum suggestions per section */
1070
+ maxSuggestionsPerSection?: number;
1071
+ /** Minimum query length */
1072
+ minQueryLength?: number;
1073
+ /** Debounce delay in ms */
1074
+ debounceMs?: number;
1075
+ /** Include dropdown recommendations from API */
1076
+ includeDropdownRecommendations?: boolean;
1077
+ /** Include categories in suggestions */
1078
+ includeCategories?: boolean;
1079
+ /** Max categories per suggestion */
1080
+ maxCategories?: number;
1081
+ /** Show suggestion counts */
1082
+ showCounts?: boolean;
1083
+ /** Show category counts */
1084
+ showCategoryCounts?: boolean;
1085
+ /** Show section headers */
1086
+ showSectionHeaders?: boolean;
1087
+ /** Custom class names */
1088
+ classNames?: QuerySuggestionsClassNames;
1089
+ /** Custom CSS styles */
1090
+ style?: React__default.CSSProperties;
1091
+ /** Custom render for suggestion */
1092
+ renderSuggestion?: (suggestion: SuggestionItem$2, isActive: boolean) => React__default.ReactNode;
1093
+ /** Custom render for category pill */
1094
+ renderCategory?: (category: SuggestionCategory) => React__default.ReactNode;
1095
+ /** Custom render for trending item */
1096
+ renderTrendingItem?: (item: TrendingSearch, index: number) => React__default.ReactNode;
1097
+ /** Custom render for recent item */
1098
+ renderRecentItem?: (item: RecentSearch) => React__default.ReactNode;
1099
+ /** Custom header content */
1100
+ header?: React__default.ReactNode;
1101
+ /** Custom footer content */
1102
+ footer?: React__default.ReactNode;
1103
+ /** Dropdown width */
1104
+ width?: string | number;
1105
+ /** Dropdown max height */
1106
+ maxHeight?: string | number;
1107
+ /** Z-index */
1108
+ zIndex?: number;
1109
+ /** ARIA label */
1110
+ ariaLabel?: string;
1111
+ /** Analytics tags */
1112
+ analyticsTags?: string[];
1113
+ }
1114
+ interface RichQuerySuggestionsRef {
1115
+ getActiveIndex: () => number;
1116
+ setActiveIndex: (index: number) => void;
1117
+ selectActive: () => void;
1118
+ navigateNext: () => void;
1119
+ navigatePrevious: () => void;
1120
+ getTotalItems: () => number;
1121
+ }
1122
+ declare const RichQuerySuggestions: React__default.ForwardRefExoticComponent<RichQuerySuggestionsProps & React__default.RefAttributes<RichQuerySuggestionsRef>>;
1123
+
1124
+ /**
1125
+ * FederatedDropdown Component
1126
+ *
1127
+ * Full-featured federated search dropdown with:
1128
+ * - Multi-column layout (suggestions + products)
1129
+ * - Filtered tabs with product results
1130
+ * - Popular brands
1131
+ * - Trending products
1132
+ * - Category navigation
1133
+ * - Responsive design
1134
+ * - Rich product cards
1135
+ */
1136
+
1137
+ interface FederatedDropdownProps extends QuerySuggestionsEventHandlers {
1138
+ /** Current query string */
1139
+ query: string;
1140
+ /** Whether the dropdown is visible */
1141
+ isOpen?: boolean;
1142
+ /** Maximum suggestions to show */
1143
+ maxSuggestions?: number;
1144
+ /** Maximum products to show per section */
1145
+ maxProducts?: number;
1146
+ /** Maximum brands to show */
1147
+ maxBrands?: number;
1148
+ /** Minimum query length */
1149
+ minQueryLength?: number;
1150
+ /** Debounce delay in ms */
1151
+ debounceMs?: number;
1152
+ /** Filtered tabs configuration */
1153
+ filteredTabs?: Array<{
1154
+ id?: string;
1155
+ label: string;
1156
+ filter: string;
1157
+ }>;
1158
+ /** Show products section */
1159
+ showProducts?: boolean;
1160
+ /** Show brands section */
1161
+ showBrands?: boolean;
1162
+ /** Show filtered tabs */
1163
+ showFilteredTabs?: boolean;
1164
+ /** Show recent searches */
1165
+ showRecentSearches?: boolean;
1166
+ /** Layout mode */
1167
+ layout?: 'side-by-side' | 'stacked' | 'full-width';
1168
+ /** Products column width (for side-by-side) */
1169
+ productsColumnWidth?: string;
1170
+ /** Suggestions column width (for side-by-side) */
1171
+ suggestionsColumnWidth?: string;
1172
+ /** Show product prices */
1173
+ showPrices?: boolean;
1174
+ /** Currency symbol */
1175
+ currencySymbol?: string;
1176
+ /** Custom class names */
1177
+ classNames?: QuerySuggestionsClassNames;
1178
+ /** Custom styles */
1179
+ style?: React__default.CSSProperties;
1180
+ /** Custom product card renderer */
1181
+ renderProduct?: (product: ProductItem, index: number) => React__default.ReactNode;
1182
+ /** Custom suggestion renderer */
1183
+ renderSuggestion?: (suggestion: SuggestionItem$2, index: number, isActive: boolean) => React__default.ReactNode;
1184
+ /** Custom brand renderer */
1185
+ renderBrand?: (brand: PopularBrand, index: number) => React__default.ReactNode;
1186
+ /** Custom tab renderer */
1187
+ renderTab?: (tab: FilteredTab, isActive: boolean) => React__default.ReactNode;
1188
+ /** Header content */
1189
+ header?: React__default.ReactNode;
1190
+ /** Footer content */
1191
+ footer?: React__default.ReactNode;
1192
+ /** View all products link */
1193
+ viewAllProductsLink?: string;
1194
+ /** Width */
1195
+ width?: string | number;
1196
+ /** Max height */
1197
+ maxHeight?: string | number;
1198
+ /** Z-index */
1199
+ zIndex?: number;
1200
+ /** Analytics tags */
1201
+ analyticsTags?: string[];
1202
+ }
1203
+ interface FederatedDropdownRef {
1204
+ getActiveIndex: () => number;
1205
+ setActiveIndex: (index: number) => void;
1206
+ selectActive: () => void;
1207
+ navigateNext: () => void;
1208
+ navigatePrevious: () => void;
1209
+ getActiveTab: () => string | null;
1210
+ setActiveTab: (tabId: string) => void;
1211
+ }
1212
+ declare const FederatedDropdown: React__default.ForwardRefExoticComponent<FederatedDropdownProps & React__default.RefAttributes<FederatedDropdownRef>>;
1213
+
1214
+ /**
1215
+ * SearchBarWithSuggestions Component
1216
+ *
1217
+ * Integrated search bar with query suggestions dropdown.
1218
+ * Combines SearchBar with any of the suggestion dropdown variants.
1219
+ */
1220
+
1221
+ interface SearchBarWithSuggestionsProps {
1222
+ /** Dropdown variant to use */
1223
+ variant?: QuerySuggestionsVariant;
1224
+ /** Placeholder text */
1225
+ placeholder?: string;
1226
+ /** Initial query value */
1227
+ initialQuery?: string;
1228
+ /** Controlled query value */
1229
+ value?: string;
1230
+ /** Callback when query changes */
1231
+ onQueryChange?: (query: string) => void;
1232
+ /** Callback when search is submitted */
1233
+ onSearch?: (query: string) => void;
1234
+ /** Callback when suggestion is selected */
1235
+ onSuggestionSelect?: (suggestion: SuggestionItem$2) => void;
1236
+ /** Callback when product is clicked */
1237
+ onProductClick?: (product: ProductItem) => void;
1238
+ /** Show search button */
1239
+ showSearchButton?: boolean;
1240
+ /** Search button text */
1241
+ searchButtonText?: string;
1242
+ /** Show clear button */
1243
+ showClearButton?: boolean;
1244
+ /** Auto focus on mount */
1245
+ autoFocus?: boolean;
1246
+ /** Min query length for suggestions */
1247
+ minQueryLength?: number;
1248
+ /** Max suggestions to show */
1249
+ maxSuggestions?: number;
1250
+ /** Debounce delay (ms) */
1251
+ debounceMs?: number;
1252
+ /** Show recent searches */
1253
+ showRecentSearches?: boolean;
1254
+ /** Show trending when empty */
1255
+ showTrendingOnEmpty?: boolean;
1256
+ /** Include dropdown recommendations */
1257
+ includeDropdownRecommendations?: boolean;
1258
+ /** Filtered tabs config */
1259
+ filteredTabs?: Array<{
1260
+ id?: string;
1261
+ label: string;
1262
+ filter: string;
1263
+ }>;
1264
+ /** Enable analytics tracking */
1265
+ enableAnalytics?: boolean;
1266
+ /** Analytics tags */
1267
+ analyticsTags?: string[];
1268
+ /** Dropdown width */
1269
+ dropdownWidth?: string | number;
1270
+ /** Dropdown max height */
1271
+ dropdownMaxHeight?: string | number;
1272
+ /** Custom class names */
1273
+ classNames?: {
1274
+ wrapper?: string;
1275
+ input?: string;
1276
+ button?: string;
1277
+ clearButton?: string;
1278
+ dropdown?: string;
1279
+ } & QuerySuggestionsClassNames;
1280
+ /** Custom styles */
1281
+ style?: React__default.CSSProperties;
1282
+ /** Input style */
1283
+ inputStyle?: React__default.CSSProperties;
1284
+ /** ARIA label */
1285
+ ariaLabel?: string;
1286
+ }
1287
+ interface SearchBarWithSuggestionsRef {
1288
+ /** Focus the input */
1289
+ focus: () => void;
1290
+ /** Blur the input */
1291
+ blur: () => void;
1292
+ /** Clear the input */
1293
+ clear: () => void;
1294
+ /** Get current query */
1295
+ getQuery: () => string;
1296
+ /** Set query value */
1297
+ setQuery: (query: string) => void;
1298
+ /** Open dropdown */
1299
+ openDropdown: () => void;
1300
+ /** Close dropdown */
1301
+ closeDropdown: () => void;
1302
+ /** Navigate to next suggestion */
1303
+ navigateNext: () => void;
1304
+ /** Navigate to previous suggestion */
1305
+ navigatePrevious: () => void;
1306
+ /** Select current suggestion */
1307
+ selectCurrent: () => void;
1308
+ }
1309
+ declare const SearchBarWithSuggestions: React__default.ForwardRefExoticComponent<SearchBarWithSuggestionsProps & React__default.RefAttributes<SearchBarWithSuggestionsRef>>;
1310
+
1311
+ /**
1312
+ * Shared Types for Query Suggestions Components
1313
+ *
1314
+ * Data-agnostic types that allow clients to map their own field names
1315
+ */
1316
+
1317
+ /** Maps client's data fields to component expected fields */
1318
+ interface SuggestionFieldMapping {
1319
+ /** Field path for suggestion text (e.g., "query", "searchTerm", "text") */
1320
+ query: string;
1321
+ /** Field path for suggestion count/popularity */
1322
+ count?: string;
1323
+ /** Field path for object ID */
1324
+ id?: string;
1325
+ /** Field path for categories array */
1326
+ categories?: string;
1327
+ /** Field path for highlighted text */
1328
+ highlighted?: string;
1329
+ /** Custom field mappings */
1330
+ custom?: Record<string, string>;
1331
+ }
1332
+ /** Maps client's product fields to component expected fields */
1333
+ interface ProductFieldMapping {
1334
+ /** Field path for product ID */
1335
+ id: string;
1336
+ /** Field path for product title/name */
1337
+ title: string;
1338
+ /** Field path for product image URL */
1339
+ image?: string;
1340
+ /** Field path for product price */
1341
+ price?: string;
1342
+ /** Field path for original/compare price */
1343
+ comparePrice?: string;
1344
+ /** Field path for product URL */
1345
+ url?: string;
1346
+ /** Field path for brand name */
1347
+ brand?: string;
1348
+ /** Field path for category */
1349
+ category?: string;
1350
+ /** Field path for rating */
1351
+ rating?: string;
1352
+ /** Field path for review count */
1353
+ reviewCount?: string;
1354
+ /** Field path for discount percentage */
1355
+ discount?: string;
1356
+ /** Field path for availability/in stock */
1357
+ inStock?: string;
1358
+ /** Field path for currency */
1359
+ currency?: string;
1360
+ /** Custom field mappings */
1361
+ custom?: Record<string, string>;
1362
+ }
1363
+ /** Maps client's category/tab fields */
1364
+ interface CategoryFieldMapping {
1365
+ id: string;
1366
+ label: string;
1367
+ count?: string;
1368
+ icon?: string;
1369
+ image?: string;
1370
+ }
1371
+ /** Maps client's brand fields */
1372
+ interface BrandFieldMapping {
1373
+ id?: string;
1374
+ name: string;
1375
+ logo?: string;
1376
+ count?: string;
1377
+ }
1378
+ type DropdownLayout = 'list' | 'two-column' | 'three-column' | 'grid' | 'hero' | 'full-width' | 'mobile-sheet' | 'overlay';
1379
+ type ProductCardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
1380
+ type ProductCardStyle = 'minimal' | 'standard' | 'detailed' | 'compact' | 'horizontal';
1381
+ /** Available dropdown variants */
1382
+ type SuggestionDropdownVariant$1 = 'amazon' | 'google' | 'pinterest' | 'spotlight' | 'shopify' | 'mobile-sheet' | 'minimal';
1383
+ interface VisualConfig {
1384
+ /** Overall dropdown layout */
1385
+ layout?: DropdownLayout;
1386
+ /** Show/hide shadows */
1387
+ shadows?: boolean;
1388
+ /** Border radius (px or CSS value) */
1389
+ borderRadius?: number | string;
1390
+ /** Animation style */
1391
+ animation?: 'none' | 'fade' | 'slide' | 'scale' | 'spring';
1392
+ /** Animation duration in ms */
1393
+ animationDuration?: number;
1394
+ /** Blur background when open */
1395
+ backdropBlur?: boolean;
1396
+ /** Show dividers between sections */
1397
+ showDividers?: boolean;
1398
+ /** Compact mode (reduced padding) */
1399
+ compact?: boolean;
1400
+ }
1401
+ type SectionType = 'suggestions' | 'recent' | 'trending' | 'products' | 'categories' | 'brands' | 'collections' | 'pages' | 'custom';
1402
+ interface SectionConfig {
1403
+ /** Section identifier */
1404
+ id: SectionType | string;
1405
+ /** Section title (can be ReactNode for custom rendering) */
1406
+ title?: string | ReactNode;
1407
+ /** Whether section is enabled */
1408
+ enabled?: boolean;
1409
+ /** Maximum items to show */
1410
+ maxItems?: number;
1411
+ /** Section display order (lower = higher) */
1412
+ order?: number;
1413
+ /** Section-specific layout override */
1414
+ layout?: 'list' | 'grid' | 'horizontal-scroll' | 'chips';
1415
+ /** Number of columns for grid layout */
1416
+ columns?: number;
1417
+ /** Show "View All" link */
1418
+ showViewAll?: boolean;
1419
+ /** View All link URL or handler */
1420
+ viewAllLink?: string;
1421
+ /** Custom CSS class */
1422
+ className?: string;
1423
+ /** Custom styles */
1424
+ style?: CSSProperties;
1425
+ /** Custom renderer for entire section */
1426
+ render?: (data: any[], config: SectionConfig) => ReactNode;
1427
+ /** Custom renderer for individual items */
1428
+ renderItem?: (item: any, index: number) => ReactNode;
1429
+ /** Empty state message */
1430
+ emptyMessage?: string;
1431
+ /** Icon for section header */
1432
+ icon?: ReactNode;
1433
+ }
1434
+ interface ProductDisplayConfig {
1435
+ /** Card size */
1436
+ size?: ProductCardSize;
1437
+ /** Card style */
1438
+ style?: ProductCardStyle;
1439
+ /** Show product image */
1440
+ showImage?: boolean;
1441
+ /** Image aspect ratio */
1442
+ imageAspectRatio?: '1:1' | '4:3' | '3:4' | '16:9' | 'auto';
1443
+ /** Show price */
1444
+ showPrice?: boolean;
1445
+ /** Show compare/original price */
1446
+ showComparePrice?: boolean;
1447
+ /** Show discount badge */
1448
+ showDiscount?: boolean;
1449
+ /** Show brand */
1450
+ showBrand?: boolean;
1451
+ /** Show rating */
1452
+ showRating?: boolean;
1453
+ /** Show stock status */
1454
+ showStock?: boolean;
1455
+ /** Show add to cart button */
1456
+ showAddToCart?: boolean;
1457
+ /** Currency symbol */
1458
+ currency?: string;
1459
+ /** Currency position */
1460
+ currencyPosition?: 'before' | 'after';
1461
+ /** Decimal places for price */
1462
+ priceDecimals?: number;
1463
+ /** Truncate title after N lines */
1464
+ titleLines?: number;
1465
+ /** Hover effect */
1466
+ hoverEffect?: 'none' | 'lift' | 'glow' | 'scale' | 'border';
1467
+ /** Image placeholder */
1468
+ imagePlaceholder?: ReactNode;
1469
+ /** Lazy load images */
1470
+ lazyLoadImages?: boolean;
1471
+ }
1472
+ interface SuggestionDisplayConfig {
1473
+ /** Show search icon */
1474
+ showIcon?: boolean;
1475
+ /** Custom icon */
1476
+ icon?: ReactNode;
1477
+ /** Show hit count */
1478
+ showCount?: boolean;
1479
+ /** Show categories inline */
1480
+ showCategories?: boolean;
1481
+ /** Max categories to show */
1482
+ maxCategories?: number;
1483
+ /** Highlight matching text */
1484
+ highlightMatches?: boolean;
1485
+ /** Highlight style */
1486
+ highlightStyle?: CSSProperties;
1487
+ /** Show arrow on hover */
1488
+ showArrow?: boolean;
1489
+ /** Category click behavior */
1490
+ categoryClickable?: boolean;
1491
+ }
1492
+ interface DropdownThemeConfig {
1493
+ /** Light/dark mode */
1494
+ mode?: 'light' | 'dark' | 'auto';
1495
+ /** Primary brand color */
1496
+ primaryColor?: string;
1497
+ /** Background color */
1498
+ backgroundColor?: string;
1499
+ /** Surface color (cards, sections) */
1500
+ surfaceColor?: string;
1501
+ /** Text color */
1502
+ textColor?: string;
1503
+ /** Secondary text color */
1504
+ textSecondaryColor?: string;
1505
+ /** Border color */
1506
+ borderColor?: string;
1507
+ /** Hover background */
1508
+ hoverColor?: string;
1509
+ /** Highlight/match color */
1510
+ highlightColor?: string;
1511
+ /** Success color (in stock, etc.) */
1512
+ successColor?: string;
1513
+ /** Error color (out of stock, etc.) */
1514
+ errorColor?: string;
1515
+ /** Font family */
1516
+ fontFamily?: string;
1517
+ /** Base font size */
1518
+ fontSize?: number | string;
1519
+ /** Border radius */
1520
+ borderRadius?: number | string;
1521
+ /** Box shadow */
1522
+ boxShadow?: string;
1523
+ /** Custom CSS variables */
1524
+ cssVariables?: Record<string, string>;
1525
+ }
1526
+ interface AnalyticsConfig {
1527
+ /** Enable analytics */
1528
+ enabled?: boolean;
1529
+ /** Track suggestion clicks */
1530
+ trackSuggestionClicks?: boolean;
1531
+ /** Track product clicks */
1532
+ trackProductClicks?: boolean;
1533
+ /** Track impressions */
1534
+ trackImpressions?: boolean;
1535
+ /** Impression debounce time (ms) */
1536
+ impressionDebounce?: number;
1537
+ /** Track category clicks */
1538
+ trackCategoryClicks?: boolean;
1539
+ /** Track brand clicks */
1540
+ trackBrandClicks?: boolean;
1541
+ /** Track search submissions */
1542
+ trackSearchSubmit?: boolean;
1543
+ /** Custom analytics tags */
1544
+ tags?: string[];
1545
+ /** User ID for personalization */
1546
+ userId?: string;
1547
+ /** Session ID */
1548
+ sessionId?: string;
1549
+ /** Custom event handler */
1550
+ onEvent?: (eventType: string, data: any) => void;
1551
+ }
1552
+ interface DropdownEventHandlers<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> {
1553
+ /** Suggestion selected */
1554
+ onSuggestionSelect?: (suggestion: TSuggestion, index: number) => void;
1555
+ /** Product clicked */
1556
+ onProductClick?: (product: TProduct, index: number) => void;
1557
+ /** Category clicked */
1558
+ onCategoryClick?: (category: TCategory, suggestion?: TSuggestion) => void;
1559
+ /** Brand clicked */
1560
+ onBrandClick?: (brand: TBrand) => void;
1561
+ /** Tab/filter changed */
1562
+ onTabChange?: (tabId: string, tab?: any) => void;
1563
+ /** Recent search clicked */
1564
+ onRecentClick?: (query: string) => void;
1565
+ /** Recent search removed */
1566
+ onRecentRemove?: (query: string) => void;
1567
+ /** Clear all recent searches */
1568
+ onRecentClearAll?: () => void;
1569
+ /** View all clicked */
1570
+ onViewAll?: (section: SectionType | string) => void;
1571
+ /** Search submitted */
1572
+ onSearchSubmit?: (query: string) => void;
1573
+ /** Dropdown opened */
1574
+ onOpen?: () => void;
1575
+ /** Dropdown closed */
1576
+ onClose?: () => void;
1577
+ /** Keyboard navigation */
1578
+ onNavigate?: (direction: 'up' | 'down' | 'left' | 'right', index: number) => void;
1579
+ /** Add to cart clicked (if enabled) */
1580
+ onAddToCart?: (product: TProduct) => void;
1581
+ }
1582
+ interface AccessibilityConfig {
1583
+ /** ARIA label for dropdown */
1584
+ ariaLabel?: string;
1585
+ /** ARIA labelledby */
1586
+ ariaLabelledBy?: string;
1587
+ /** Announce selection to screen readers */
1588
+ announceSelection?: boolean;
1589
+ /** Custom announcement text */
1590
+ getAnnouncementText?: (item: any, type: string) => string;
1591
+ /** Keyboard navigation enabled */
1592
+ keyboardNavigation?: boolean;
1593
+ /** Focus trap (keep focus within dropdown) */
1594
+ focusTrap?: boolean;
1595
+ /** Auto focus first item */
1596
+ autoFocus?: boolean;
1597
+ /** Close on escape */
1598
+ closeOnEscape?: boolean;
1599
+ /** Close on click outside */
1600
+ closeOnClickOutside?: boolean;
1601
+ }
1602
+ interface BaseDropdownProps<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> extends DropdownEventHandlers<TSuggestion, TProduct, TCategory, TBrand> {
1603
+ /** Current search query */
1604
+ query: string;
1605
+ /** Whether dropdown is open/visible */
1606
+ isOpen?: boolean;
1607
+ /** Loading state */
1608
+ loading?: boolean;
1609
+ /** Error state */
1610
+ error?: Error | string | null;
1611
+ /** Suggestion items */
1612
+ suggestions?: TSuggestion[];
1613
+ /** Product items */
1614
+ products?: TProduct[];
1615
+ /** Category/filter tabs */
1616
+ categories?: TCategory[];
1617
+ /** Brand items */
1618
+ brands?: TBrand[];
1619
+ /** Recent searches (strings or objects) */
1620
+ recentSearches?: string[] | Array<{
1621
+ query: string;
1622
+ timestamp?: number;
1623
+ }>;
1624
+ /** Trending searches */
1625
+ trendingSearches?: string[] | TSuggestion[];
1626
+ /** Filtered tabs with products */
1627
+ filteredTabs?: Array<{
1628
+ id: string;
1629
+ label: string;
1630
+ products?: TProduct[];
1631
+ nb_hits?: number;
1632
+ filter?: string;
1633
+ }>;
1634
+ /** Currently active tab ID */
1635
+ activeTab?: string;
1636
+ /** Map suggestion data fields */
1637
+ suggestionFields?: SuggestionFieldMapping;
1638
+ /** Map product data fields */
1639
+ productFields?: ProductFieldMapping;
1640
+ /** Map category data fields */
1641
+ categoryFields?: CategoryFieldMapping;
1642
+ /** Map brand data fields */
1643
+ brandFields?: BrandFieldMapping;
1644
+ /** Section configurations */
1645
+ sections?: SectionConfig[];
1646
+ /** Product display config */
1647
+ productDisplay?: ProductDisplayConfig;
1648
+ /** Suggestion display config */
1649
+ suggestionDisplay?: SuggestionDisplayConfig;
1650
+ /** Visual/layout config */
1651
+ visual?: VisualConfig;
1652
+ /** Theme config */
1653
+ theme?: DropdownThemeConfig;
1654
+ /** Analytics config */
1655
+ analytics?: AnalyticsConfig;
1656
+ /** Accessibility config */
1657
+ accessibility?: AccessibilityConfig;
1658
+ /** Dropdown width */
1659
+ width?: string | number;
1660
+ /** Dropdown max height */
1661
+ maxHeight?: string | number;
1662
+ /** Dropdown min height */
1663
+ minHeight?: string | number;
1664
+ /** Z-index */
1665
+ zIndex?: number;
1666
+ /** Root CSS class */
1667
+ className?: string;
1668
+ /** Root inline styles */
1669
+ style?: CSSProperties;
1670
+ /** CSS classes for parts */
1671
+ classNames?: Partial<DropdownClassNames>;
1672
+ /** Inline styles for parts */
1673
+ styles?: Partial<DropdownStyles>;
1674
+ /** Custom header */
1675
+ header?: ReactNode;
1676
+ /** Custom footer */
1677
+ footer?: ReactNode;
1678
+ /** Custom loading state */
1679
+ renderLoading?: () => ReactNode;
1680
+ /** Custom empty state */
1681
+ renderEmpty?: (query: string) => ReactNode;
1682
+ /** Custom error state */
1683
+ renderError?: (error: Error | string) => ReactNode;
1684
+ /** Reference to input element (for focus management) */
1685
+ inputRef?: React.RefObject<HTMLInputElement>;
1686
+ }
1687
+ interface DropdownClassNames {
1688
+ root: string;
1689
+ container: string;
1690
+ header: string;
1691
+ content: string;
1692
+ footer: string;
1693
+ section: string;
1694
+ sectionHeader: string;
1695
+ sectionTitle: string;
1696
+ sectionContent: string;
1697
+ sectionViewAll: string;
1698
+ suggestionsList: string;
1699
+ suggestionItem: string;
1700
+ suggestionItemActive: string;
1701
+ suggestionIcon: string;
1702
+ suggestionText: string;
1703
+ suggestionHighlight: string;
1704
+ suggestionCount: string;
1705
+ suggestionCategories: string;
1706
+ suggestionCategory: string;
1707
+ suggestionArrow: string;
1708
+ productsList: string;
1709
+ productCard: string;
1710
+ productCardHover: string;
1711
+ productImage: string;
1712
+ productImagePlaceholder: string;
1713
+ productInfo: string;
1714
+ productTitle: string;
1715
+ productBrand: string;
1716
+ productPrice: string;
1717
+ productComparePrice: string;
1718
+ productDiscount: string;
1719
+ productRating: string;
1720
+ productStock: string;
1721
+ productAddToCart: string;
1722
+ categoriesList: string;
1723
+ categoryItem: string;
1724
+ categoryItemActive: string;
1725
+ categoryIcon: string;
1726
+ categoryLabel: string;
1727
+ categoryCount: string;
1728
+ brandsList: string;
1729
+ brandItem: string;
1730
+ brandLogo: string;
1731
+ brandName: string;
1732
+ recentList: string;
1733
+ recentItem: string;
1734
+ recentIcon: string;
1735
+ recentText: string;
1736
+ recentRemove: string;
1737
+ recentClearAll: string;
1738
+ trendingList: string;
1739
+ trendingItem: string;
1740
+ trendingIcon: string;
1741
+ tabsList: string;
1742
+ tabItem: string;
1743
+ tabItemActive: string;
1744
+ tabCount: string;
1745
+ loading: string;
1746
+ loadingSpinner: string;
1747
+ empty: string;
1748
+ emptyIcon: string;
1749
+ emptyText: string;
1750
+ error: string;
1751
+ errorIcon: string;
1752
+ errorText: string;
1753
+ keyboard: string;
1754
+ keyboardHint: string;
1755
+ keyboardKey: string;
1756
+ }
1757
+ interface DropdownStyles {
1758
+ root: CSSProperties;
1759
+ container: CSSProperties;
1760
+ header: CSSProperties;
1761
+ content: CSSProperties;
1762
+ footer: CSSProperties;
1763
+ section: CSSProperties;
1764
+ suggestionItem: CSSProperties;
1765
+ productCard: CSSProperties;
1766
+ categoryItem: CSSProperties;
1767
+ brandItem: CSSProperties;
1768
+ }
1769
+ interface DropdownRef {
1770
+ /** Get currently active/focused index */
1771
+ getActiveIndex: () => number;
1772
+ /** Set active index */
1773
+ setActiveIndex: (index: number) => void;
1774
+ /** Select currently active item */
1775
+ selectActive: () => void;
1776
+ /** Navigate to next item */
1777
+ navigateNext: () => void;
1778
+ /** Navigate to previous item */
1779
+ navigatePrevious: () => void;
1780
+ /** Focus the dropdown */
1781
+ focus: () => void;
1782
+ /** Close the dropdown */
1783
+ close: () => void;
1784
+ /** Get active tab ID (if tabs exist) */
1785
+ getActiveTab?: () => string | null;
1786
+ /** Set active tab */
1787
+ setActiveTab?: (tabId: string) => void;
1788
+ /** Scroll to item */
1789
+ scrollToItem?: (index: number) => void;
1790
+ }
1791
+
1792
+ /**
1793
+ * MinimalDropdown - Ultra-Clean Minimalist Style
1794
+ *
1795
+ * Features:
1796
+ * - Stripped-down, distraction-free design
1797
+ * - Focus on typography and whitespace
1798
+ * - Subtle animations
1799
+ * - Perfect for editorial/content sites
1800
+ */
1801
+
1802
+ interface MinimalDropdownProps extends BaseDropdownProps {
1803
+ /** Show item indices */
1804
+ showIndices?: boolean;
1805
+ /** Show item type labels */
1806
+ showTypeLabels?: boolean;
1807
+ /** Show dividers between sections */
1808
+ showSectionDividers?: boolean;
1809
+ /** Monospace indices */
1810
+ monoIndices?: boolean;
1811
+ }
1812
+ declare const MinimalDropdown: React__default.ForwardRefExoticComponent<MinimalDropdownProps & React__default.RefAttributes<DropdownRef>>;
1813
+
1814
+ /**
1815
+ * MobileSheetDropdown - Mobile-First Bottom Sheet Style
1816
+ *
1817
+ * Features:
1818
+ * - iOS-style bottom sheet with drag handle
1819
+ * - Full-screen overlay with smooth transitions
1820
+ * - Touch-friendly large tap targets
1821
+ * - Swipe to dismiss
1822
+ * - Optimized for small screens
1823
+ */
1824
+
1825
+ interface MobileSheetDropdownProps extends BaseDropdownProps {
1826
+ /** Show search input in header */
1827
+ showSearchInput?: boolean;
1828
+ /** Show cancel button */
1829
+ showCancel?: boolean;
1830
+ /** Cancel button text */
1831
+ cancelText?: string;
1832
+ /** Show drag handle */
1833
+ showDragHandle?: boolean;
1834
+ /** Enable swipe to dismiss */
1835
+ swipeToDismiss?: boolean;
1836
+ /** Footer button text */
1837
+ footerButtonText?: string;
1838
+ /** Show footer button */
1839
+ showFooterButton?: boolean;
1840
+ }
1841
+ declare const MobileSheetDropdown: React__default.ForwardRefExoticComponent<MobileSheetDropdownProps & React__default.RefAttributes<DropdownRef>>;
1842
+
1843
+ /**
1844
+ * ShopifyDropdown - Modern E-commerce Style Suggestions
1845
+ *
1846
+ * Features:
1847
+ * - Hero product with large image
1848
+ * - Horizontal product scroll
1849
+ * - Collection/category links
1850
+ * - Clean, modern design
1851
+ * - Quick add to cart
1852
+ */
1853
+
1854
+ interface ShopifyDropdownProps extends BaseDropdownProps {
1855
+ /** Show hero product */
1856
+ showHeroProduct?: boolean;
1857
+ /** Show collections/categories */
1858
+ showCollections?: boolean;
1859
+ /** Show add to cart button */
1860
+ showAddToCart?: boolean;
1861
+ /** Add to cart text */
1862
+ addToCartText?: string;
1863
+ /** Show compare price */
1864
+ showComparePrice?: boolean;
1865
+ }
1866
+ declare const ShopifyDropdown: React__default.ForwardRefExoticComponent<ShopifyDropdownProps & React__default.RefAttributes<DropdownRef>>;
1867
+
1868
+ /**
1869
+ * SpotlightDropdown - macOS Spotlight / Command Palette Style
1870
+ *
1871
+ * Features:
1872
+ * - Clean, centered modal design
1873
+ * - Category grouping with keyboard navigation
1874
+ * - Instant preview panel
1875
+ * - Actions/commands support
1876
+ * - Keyboard-first interaction
1877
+ */
1878
+
1879
+ interface SpotlightDropdownProps extends BaseDropdownProps {
1880
+ /** Show preview panel */
1881
+ showPreview?: boolean;
1882
+ /** Show as overlay */
1883
+ asOverlay?: boolean;
1884
+ /** Placeholder text */
1885
+ placeholder?: string;
1886
+ /** Show keyboard shortcuts */
1887
+ showShortcuts?: boolean;
1888
+ /** Quick actions */
1889
+ actions?: Array<{
1890
+ id: string;
1891
+ label: string;
1892
+ icon?: React__default.ReactNode;
1893
+ shortcut?: string;
1894
+ onAction: () => void;
1895
+ }>;
1896
+ }
1897
+ declare const SpotlightDropdown: React__default.ForwardRefExoticComponent<SpotlightDropdownProps & React__default.RefAttributes<DropdownRef>>;
1898
+
1899
+ /**
1900
+ * PinterestDropdown - Visual Discovery Style Suggestions
1901
+ *
1902
+ * Features:
1903
+ * - Visually-driven masonry/grid product display
1904
+ * - Large hero images
1905
+ * - Category chips/pills for filtering
1906
+ * - Smooth hover effects with quick preview
1907
+ * - Color palette extraction ready
1908
+ */
1909
+
1910
+ interface PinterestDropdownProps extends BaseDropdownProps {
1911
+ /** Show save/pin button on products */
1912
+ showSaveButton?: boolean;
1913
+ /** Save button handler */
1914
+ onSaveProduct?: (product: any) => void;
1915
+ /** Active category ID */
1916
+ activeCategory?: string;
1917
+ /** Show price overlay on hover */
1918
+ showPriceOverlay?: boolean;
1919
+ /** Grid columns */
1920
+ gridColumns?: number;
1921
+ /** Card aspect ratio */
1922
+ cardAspectRatio?: 'square' | 'portrait' | 'landscape';
1923
+ }
1924
+ declare const PinterestDropdown: React__default.ForwardRefExoticComponent<PinterestDropdownProps & React__default.RefAttributes<DropdownRef>>;
1925
+
1926
+ /**
1927
+ * GoogleDropdown - Google-style Clean Search Suggestions
1928
+ *
1929
+ * Features:
1930
+ * - Ultra-clean, minimal design
1931
+ * - Instant suggestions with smooth animations
1932
+ * - Trending searches when empty
1933
+ * - "I'm Feeling Lucky" style quick actions
1934
+ * - Voice search integration ready
1935
+ */
1936
+
1937
+ interface GoogleDropdownProps extends BaseDropdownProps {
1938
+ /** Show "I'm Feeling Lucky" button */
1939
+ showFeelingLucky?: boolean;
1940
+ /** Feeling lucky button text */
1941
+ feelingLuckyText?: string;
1942
+ /** Show remove button on recent searches */
1943
+ showRemoveRecent?: boolean;
1944
+ /** Show voice search button */
1945
+ showVoiceSearch?: boolean;
1946
+ /** Voice search handler */
1947
+ onVoiceSearch?: () => void;
1948
+ /** Feeling lucky handler */
1949
+ onFeelingLucky?: (query: string) => void;
1950
+ /** Show trending indicator */
1951
+ showTrendingIndicator?: boolean;
1952
+ }
1953
+ declare const GoogleDropdown: React__default.ForwardRefExoticComponent<GoogleDropdownProps & React__default.RefAttributes<DropdownRef>>;
1954
+
1955
+ /**
1956
+ * AmazonDropdown - Amazon-style Search Suggestions
1957
+ *
1958
+ * Features:
1959
+ * - Department/category scoping in search
1960
+ * - Suggestions with category context
1961
+ * - Product grid with images
1962
+ * - "in Department" suffix for scoped searches
1963
+ * - Clean, functional design
1964
+ */
1965
+
1966
+ interface AmazonDropdownProps extends BaseDropdownProps {
1967
+ /** Show department scoping in suggestions */
1968
+ showDepartments?: boolean;
1969
+ /** Current department filter */
1970
+ currentDepartment?: string;
1971
+ /** Available departments */
1972
+ departments?: Array<{
1973
+ id: string;
1974
+ label: string;
1975
+ }>;
1976
+ /** Show Prime badge */
1977
+ showPrime?: boolean;
1978
+ /** Prime icon URL */
1979
+ primeIconUrl?: string;
1980
+ }
1981
+ declare const AmazonDropdown: React__default.ForwardRefExoticComponent<AmazonDropdownProps & React__default.RefAttributes<DropdownRef>>;
1982
+
1983
+ /**
1984
+ * SuggestionSearchBar - Unified Search Component with Premium Dropdowns
1985
+ *
1986
+ * A self-contained search component that:
1987
+ * - Fetches suggestions from the API automatically
1988
+ * - Parses responses internally (no user-side parsing needed)
1989
+ * - Renders any of the 7 premium dropdown variants
1990
+ * - Handles analytics tracking
1991
+ * - Supports recent searches via localStorage
1992
+ * - Fully responsive and mobile-ready
1993
+ *
1994
+ * Usage:
1995
+ * ```tsx
1996
+ * <SuggestionSearchBar
1997
+ * client={seekoraClient}
1998
+ * variant="amazon"
1999
+ * onSearch={(query) => router.push(`/search?q=${query}`)}
2000
+ * />
2001
+ * ```
2002
+ */
2003
+
2004
+ interface SuggestionSearchBarProps {
2005
+ /** Seekora client instance - REQUIRED */
2006
+ client: SeekoraClient;
2007
+ /** Dropdown variant to use */
2008
+ variant?: SuggestionDropdownVariant$1;
2009
+ /** Auto-select mobile variant on small screens */
2010
+ autoMobileVariant?: boolean;
2011
+ /** Placeholder text */
2012
+ placeholder?: string;
2013
+ /** Initial/default query */
2014
+ defaultQuery?: string;
2015
+ /** Controlled query value */
2016
+ value?: string;
2017
+ /** Min characters before fetching */
2018
+ minQueryLength?: number;
2019
+ /** Max suggestions to fetch */
2020
+ maxSuggestions?: number;
2021
+ /** Debounce delay in ms */
2022
+ debounceMs?: number;
2023
+ /** Include dropdown recommendations (products, tabs, trending) */
2024
+ includeDropdownRecommendations?: boolean;
2025
+ /** Include categories per suggestion */
2026
+ includeCategories?: boolean;
2027
+ /** Filtered tabs configuration */
2028
+ filteredTabs?: Array<{
2029
+ id?: string;
2030
+ label: string;
2031
+ filter: string;
2032
+ }>;
2033
+ /** Analytics tags */
2034
+ analyticsTags?: string[];
2035
+ /** Enable recent searches */
2036
+ enableRecentSearches?: boolean;
2037
+ /** Max recent searches to store */
2038
+ maxRecentSearches?: number;
2039
+ /** Show products in dropdown */
2040
+ showProducts?: boolean;
2041
+ /** Show trending when empty */
2042
+ showTrendingOnEmpty?: boolean;
2043
+ /** Enable analytics tracking */
2044
+ enableAnalytics?: boolean;
2045
+ /** Analytics configuration */
2046
+ analyticsConfig?: AnalyticsConfig;
2047
+ /** Map suggestion fields to your data */
2048
+ suggestionFields?: SuggestionFieldMapping;
2049
+ /** Map product fields to your data */
2050
+ productFields?: ProductFieldMapping;
2051
+ /** Theme configuration */
2052
+ theme?: DropdownThemeConfig;
2053
+ /** Called when search is submitted */
2054
+ onSearch?: (query: string) => void;
2055
+ /** Called when query changes */
2056
+ onQueryChange?: (query: string) => void;
2057
+ /** Called when a suggestion is selected */
2058
+ onSuggestionSelect?: (suggestion: any, index: number) => void;
2059
+ /** Called when a product is clicked */
2060
+ onProductClick?: (product: any, index: number) => void;
2061
+ /** Called when a category/tab is clicked */
2062
+ onCategoryClick?: (category: any, index: number) => void;
2063
+ /** Called when a tab is changed */
2064
+ onTabChange?: (tabId: string) => void;
2065
+ /** Container class name */
2066
+ className?: string;
2067
+ /** Container style */
2068
+ style?: React__default.CSSProperties;
2069
+ /** Input class name */
2070
+ inputClassName?: string;
2071
+ /** Dropdown width */
2072
+ dropdownWidth?: string | number;
2073
+ /** Dropdown max height */
2074
+ dropdownMaxHeight?: string | number;
2075
+ /** Z-index for dropdown */
2076
+ zIndex?: number;
2077
+ /** Enable caching for suggestions (reduces API calls) */
2078
+ enableCache?: boolean;
2079
+ /** Cache TTL in milliseconds (default: 30000 = 30 seconds) */
2080
+ cacheTtlMs?: number;
2081
+ /** Maximum cache entries (default: 100) */
2082
+ cacheMaxSize?: number;
2083
+ }
2084
+ interface SuggestionSearchBarRef {
2085
+ focus: () => void;
2086
+ blur: () => void;
2087
+ clear: () => void;
2088
+ getQuery: () => string;
2089
+ setQuery: (query: string) => void;
2090
+ openDropdown: () => void;
2091
+ closeDropdown: () => void;
2092
+ refresh: () => void;
2093
+ /** Clear the suggestions cache */
2094
+ clearCache: () => void;
2095
+ /** Get cache statistics */
2096
+ getCacheStats: () => {
2097
+ size: number;
2098
+ maxSize: number;
2099
+ } | null;
2100
+ }
2101
+ declare const SuggestionSearchBar: React__default.ForwardRefExoticComponent<SuggestionSearchBarProps & React__default.RefAttributes<SuggestionSearchBarRef>>;
2102
+
2103
+ /**
2104
+ * Utility functions for Query Suggestions components
2105
+ */
2106
+
2107
+ /**
2108
+ * Extract suggestion fields from raw data
2109
+ */
2110
+ declare const extractSuggestion: (item: any, mapping?: SuggestionFieldMapping) => {
2111
+ query: any;
2112
+ count: any;
2113
+ id: any;
2114
+ categories: any;
2115
+ highlighted: any;
2116
+ _raw: any;
2117
+ };
2118
+ /**
2119
+ * Extract product fields from raw data
2120
+ */
2121
+ declare const extractProduct: (item: any, mapping?: ProductFieldMapping) => {
2122
+ id: any;
2123
+ title: any;
2124
+ image: any;
2125
+ price: any;
2126
+ comparePrice: any;
2127
+ url: any;
2128
+ brand: any;
2129
+ category: any;
2130
+ rating: any;
2131
+ reviewCount: any;
2132
+ discount: any;
2133
+ inStock: any;
2134
+ currency: any;
2135
+ _raw: any;
2136
+ };
2137
+ /**
2138
+ * Extract category fields from raw data
2139
+ */
2140
+ declare const extractCategory: (item: any, mapping?: CategoryFieldMapping) => {
2141
+ id: any;
2142
+ label: any;
2143
+ count: any;
2144
+ icon: any;
2145
+ image: any;
2146
+ _raw: any;
2147
+ };
2148
+ /**
2149
+ * Extract brand fields from raw data
2150
+ */
2151
+ declare const extractBrand: (item: any, mapping?: BrandFieldMapping) => {
2152
+ id: any;
2153
+ name: any;
2154
+ logo: any;
2155
+ count: any;
2156
+ _raw: any;
2157
+ };
2158
+ /**
2159
+ * Format price with currency
2160
+ */
2161
+ declare const formatPrice: (value: number | string | undefined, config?: Pick<ProductDisplayConfig, "currency" | "currencyPosition" | "priceDecimals">) => string;
2162
+ /**
2163
+ * Highlight matching text in a string
2164
+ */
2165
+ declare const highlightText: (text: string, query: string, options?: {
2166
+ tag?: string;
2167
+ className?: string;
2168
+ style?: CSSProperties;
2169
+ }) => string;
2170
+ declare const getRecentSearches: (storeId?: string) => string[];
2171
+ declare const addRecentSearch: (query: string, storeId?: string) => string[];
2172
+ declare const removeRecentSearch: (query: string, storeId?: string) => string[];
2173
+ declare const clearRecentSearches: (storeId?: string) => void;
2174
+ /**
2175
+ * Simple in-memory cache with TTL support for suggestions
2176
+ * Reduces API calls by caching results for quick repeated queries
2177
+ */
2178
+ declare class SuggestionsCache {
2179
+ private cache;
2180
+ private maxSize;
2181
+ private defaultTtl;
2182
+ constructor(options?: {
2183
+ maxSize?: number;
2184
+ defaultTtlMs?: number;
2185
+ });
2186
+ /**
2187
+ * Generate a cache key from query and options
2188
+ */
2189
+ generateKey(query: string, options?: Record<string, any>): string;
2190
+ /**
2191
+ * Get cached data if valid (not expired)
2192
+ */
2193
+ get<T>(key: string): T | null;
2194
+ /**
2195
+ * Store data in cache
2196
+ */
2197
+ set<T>(key: string, data: T, ttlMs?: number): void;
2198
+ /**
2199
+ * Check if key exists and is valid
2200
+ */
2201
+ has(key: string): boolean;
2202
+ /**
2203
+ * Clear all cached entries
2204
+ */
2205
+ clear(): void;
2206
+ /**
2207
+ * Clear expired entries
2208
+ */
2209
+ cleanup(): void;
2210
+ /**
2211
+ * Get cache statistics
2212
+ */
2213
+ getStats(): {
2214
+ size: number;
2215
+ maxSize: number;
2216
+ };
2217
+ }
2218
+ /**
2219
+ * Get the global suggestions cache instance
2220
+ */
2221
+ declare const getSuggestionsCache: (options?: {
2222
+ maxSize?: number;
2223
+ defaultTtlMs?: number;
2224
+ }) => SuggestionsCache;
2225
+ /**
2226
+ * Create a new cache instance (for isolated caching per component)
2227
+ */
2228
+ declare const createSuggestionsCache: (options?: {
2229
+ maxSize?: number;
2230
+ defaultTtlMs?: number;
2231
+ }) => SuggestionsCache;
2232
+ /**
2233
+ * Clear the global cache
2234
+ */
2235
+ declare const clearSuggestionsCache: () => void;
2236
+
2237
+ /**
2238
+ * Responsive Utilities and Breakpoints
2239
+ *
2240
+ * Shared responsive design utilities for all dropdown components
2241
+ */
2242
+
2243
+ declare const breakpoints: {
2244
+ readonly xs: 0;
2245
+ readonly sm: 480;
2246
+ readonly md: 768;
2247
+ readonly lg: 1024;
2248
+ readonly xl: 1280;
2249
+ };
2250
+ type Breakpoint = keyof typeof breakpoints;
2251
+ declare const mediaQueries: {
2252
+ readonly xs: `@media (max-width: ${number}px)`;
2253
+ readonly sm: `@media (min-width: 480px) and (max-width: ${number}px)`;
2254
+ readonly md: `@media (min-width: 768px) and (max-width: ${number}px)`;
2255
+ readonly lg: `@media (min-width: 1024px) and (max-width: ${number}px)`;
2256
+ readonly xl: "@media (min-width: 1280px)";
2257
+ readonly mobile: `@media (max-width: ${number}px)`;
2258
+ readonly tablet: `@media (min-width: 768px) and (max-width: ${number}px)`;
2259
+ readonly desktop: "@media (min-width: 1024px)";
2260
+ readonly touch: "@media (hover: none) and (pointer: coarse)";
2261
+ readonly mouse: "@media (hover: hover) and (pointer: fine)";
2262
+ };
2263
+ declare const touchTargets: {
2264
+ /** Minimum touch target size per WCAG guidelines */
2265
+ readonly minimum: 44;
2266
+ /** Comfortable touch target size */
2267
+ readonly comfortable: 48;
2268
+ /** Large touch target for primary actions */
2269
+ readonly large: 56;
2270
+ };
2271
+ interface ResponsiveState {
2272
+ isMobile: boolean;
2273
+ isTablet: boolean;
2274
+ isDesktop: boolean;
2275
+ isTouch: boolean;
2276
+ width: number;
2277
+ height: number;
2278
+ breakpoint: Breakpoint;
2279
+ }
2280
+ declare const useResponsive: () => ResponsiveState;
2281
+
2282
+ /**
2283
+ * Shared Styles Index
2284
+ */
2285
+
2286
+ declare const injectGlobalResponsiveStyles: () => void;
2287
+ /**
2288
+ * Hook to auto-inject styles on mount
2289
+ */
2290
+ declare const useInjectResponsiveStyles: () => void;
2291
+
2292
+ declare const SuggestionDropdownVariants: {
2293
+ readonly amazon: React$1.ForwardRefExoticComponent<AmazonDropdownProps & React$1.RefAttributes<DropdownRef>>;
2294
+ readonly google: React$1.ForwardRefExoticComponent<GoogleDropdownProps & React$1.RefAttributes<DropdownRef>>;
2295
+ readonly pinterest: React$1.ForwardRefExoticComponent<PinterestDropdownProps & React$1.RefAttributes<DropdownRef>>;
2296
+ readonly spotlight: React$1.ForwardRefExoticComponent<SpotlightDropdownProps & React$1.RefAttributes<DropdownRef>>;
2297
+ readonly shopify: React$1.ForwardRefExoticComponent<ShopifyDropdownProps & React$1.RefAttributes<DropdownRef>>;
2298
+ readonly 'mobile-sheet': React$1.ForwardRefExoticComponent<MobileSheetDropdownProps & React$1.RefAttributes<DropdownRef>>;
2299
+ readonly minimal: React$1.ForwardRefExoticComponent<MinimalDropdownProps & React$1.RefAttributes<DropdownRef>>;
2300
+ };
2301
+ type SuggestionDropdownVariant = keyof typeof SuggestionDropdownVariants;
2302
+
2303
+ /**
2304
+ * useSeekoraSearch Hook
2305
+ *
2306
+ * Hook for performing searches with the Seekora SDK
2307
+ */
2308
+
2309
+ interface UseSeekoraSearchOptions {
2310
+ client: SeekoraClient;
2311
+ autoTrack?: boolean;
2312
+ }
2313
+ interface UseSeekoraSearchReturn {
2314
+ search: (options: SearchOptions) => Promise<SearchResponse | null>;
2315
+ results: SearchResponse | null;
2316
+ loading: boolean;
2317
+ error: Error | null;
2318
+ context: SearchContext | null;
2319
+ clearResults: () => void;
2320
+ }
2321
+ declare const useSeekoraSearch: ({ client, autoTrack, }: UseSeekoraSearchOptions) => UseSeekoraSearchReturn;
2322
+
2323
+ /**
2324
+ * Common types for Seekora UI SDK
2325
+ */
2326
+
2327
+ interface SuggestionItem {
2328
+ query: string;
2329
+ count?: number;
2330
+ metadata?: Record<string, any>;
2331
+ }
2332
+
2333
+ /**
2334
+ * useQuerySuggestions Hook
2335
+ *
2336
+ * Hook for fetching query suggestions with debouncing
2337
+ */
2338
+
2339
+ interface UseQuerySuggestionsOptions {
2340
+ client: SeekoraClient;
2341
+ query: string;
2342
+ enabled?: boolean;
2343
+ debounceMs?: number;
2344
+ maxSuggestions?: number;
2345
+ }
2346
+ interface UseQuerySuggestionsReturn {
2347
+ suggestions: SuggestionItem[];
2348
+ loading: boolean;
2349
+ error: Error | null;
2350
+ }
2351
+ declare const useQuerySuggestions: ({ client, query, enabled, debounceMs, maxSuggestions, }: UseQuerySuggestionsOptions) => UseQuerySuggestionsReturn;
2352
+
2353
+ /**
2354
+ * Enhanced Query Suggestions Hook
2355
+ *
2356
+ * Provides full support for query suggestions API including:
2357
+ * - Basic suggestions
2358
+ * - Dropdown recommendations (trending, top searches, related)
2359
+ * - Filtered tabs with products
2360
+ * - Recent searches (local storage)
2361
+ * - Analytics tracking
2362
+ */
2363
+
2364
+ interface UseQuerySuggestionsEnhancedOptions {
2365
+ /** Seekora client instance */
2366
+ client: SeekoraClient;
2367
+ /** Current search query */
2368
+ query: string;
2369
+ /** Enable/disable the hook */
2370
+ enabled?: boolean;
2371
+ /** Debounce delay in ms */
2372
+ debounceMs?: number;
2373
+ /** Max suggestions to fetch */
2374
+ maxSuggestions?: number;
2375
+ /** Minimum query length to trigger search */
2376
+ minQueryLength?: number;
2377
+ /** Include dropdown recommendations (trending, products, etc.) */
2378
+ includeDropdownRecommendations?: boolean;
2379
+ /** Include categories in suggestions */
2380
+ includeCategories?: boolean;
2381
+ /** Include facets in suggestions */
2382
+ includeFacets?: boolean;
2383
+ /** Max categories per suggestion */
2384
+ maxCategories?: number;
2385
+ /** Max facets per suggestion */
2386
+ maxFacets?: number;
2387
+ /** Filtered tabs configuration */
2388
+ filteredTabs?: Array<{
2389
+ id?: string;
2390
+ label: string;
2391
+ filter: string;
2392
+ }>;
2393
+ /** Minimum popularity threshold */
2394
+ minPopularity?: number;
2395
+ /** Time range for analytics data */
2396
+ timeRange?: '7d' | '30d' | '90d';
2397
+ /** Disable typo tolerance */
2398
+ disableTypoTolerance?: boolean;
2399
+ /** Analytics tags */
2400
+ analyticsTags?: string[];
2401
+ /** Enable recent searches from localStorage */
2402
+ enableRecentSearches?: boolean;
2403
+ /** Max recent searches to store */
2404
+ maxRecentSearches?: number;
2405
+ /** Local storage key for recent searches */
2406
+ recentSearchesKey?: string;
2407
+ /** Callback when suggestions are loaded */
2408
+ onSuggestionsLoaded?: (response: QuerySuggestionsResponse) => void;
2409
+ /** Callback on error */
2410
+ onError?: (error: Error) => void;
2411
+ }
2412
+ interface UseQuerySuggestionsEnhancedReturn {
2413
+ /** Basic suggestion items */
2414
+ suggestions: SuggestionItem$2[];
2415
+ /** Loading state */
2416
+ loading: boolean;
2417
+ /** Error state */
2418
+ error: Error | null;
2419
+ /** Dropdown recommendations */
2420
+ dropdownRecommendations: DropdownRecommendations | null;
2421
+ /** Trending searches */
2422
+ trendingSearches: TrendingSearch[];
2423
+ /** Top searches */
2424
+ topSearches: TopSearch[];
2425
+ /** Related searches */
2426
+ relatedSearches: RelatedSearch[];
2427
+ /** Popular brands */
2428
+ popularBrands: PopularBrand[];
2429
+ /** Filtered tabs with products */
2430
+ filteredTabs: FilteredTab[];
2431
+ /** Trending products */
2432
+ trendingProducts: ProductItem[];
2433
+ /** Recent searches (from localStorage) */
2434
+ recentSearches: RecentSearch[];
2435
+ /** Processing time in ms */
2436
+ processingTimeMs: number | null;
2437
+ /** Total hits count */
2438
+ totalHits: number;
2439
+ /** Current page */
2440
+ currentPage: number;
2441
+ /** Total pages */
2442
+ totalPages: number;
2443
+ /** Original query */
2444
+ originalQuery: string;
2445
+ /** Add a search to recent searches */
2446
+ addRecentSearch: (query: string, resultsCount?: number) => void;
2447
+ /** Remove a search from recent searches */
2448
+ removeRecentSearch: (query: string) => void;
2449
+ /** Clear all recent searches */
2450
+ clearRecentSearches: () => void;
2451
+ /** Manually refetch suggestions */
2452
+ refetch: () => Promise<void>;
2453
+ /** Check if dropdown has any content to show */
2454
+ hasContent: boolean;
2455
+ /** Get all items for keyboard navigation (flattened) */
2456
+ getAllNavigableItems: () => NavigableItem[];
2457
+ }
2458
+ interface NavigableItem {
2459
+ type: 'suggestion' | 'recent' | 'trending' | 'product' | 'category' | 'brand' | 'tab';
2460
+ index: number;
2461
+ data: SuggestionItem$2 | RecentSearch | TrendingSearch | ProductItem | SuggestionCategory | PopularBrand | FilteredTab;
2462
+ }
2463
+ declare function useQuerySuggestionsEnhanced(options: UseQuerySuggestionsEnhancedOptions): UseQuerySuggestionsEnhancedReturn;
2464
+
2465
+ /**
2466
+ * Suggestions Analytics Hook
2467
+ *
2468
+ * Provides analytics tracking for query suggestions components:
2469
+ * - Suggestion clicks/selections
2470
+ * - Suggestion impressions
2471
+ * - Product clicks from dropdown
2472
+ * - Category/brand clicks
2473
+ * - Search submissions from suggestions
2474
+ */
2475
+
2476
+ interface UseSuggestionsAnalyticsOptions {
2477
+ /** Seekora client instance */
2478
+ client: SeekoraClient;
2479
+ /** Enable analytics tracking */
2480
+ enabled?: boolean;
2481
+ /** Analytics tags to include with all events */
2482
+ analyticsTags?: string[];
2483
+ /** Debounce impression events (ms) */
2484
+ impressionDebounce?: number;
2485
+ /** Track suggestion impressions automatically */
2486
+ trackImpressions?: boolean;
2487
+ /** Track clicks automatically */
2488
+ trackClicks?: boolean;
2489
+ }
2490
+ interface SuggestionClickEventData {
2491
+ /** The clicked suggestion */
2492
+ suggestion: SuggestionItem$2;
2493
+ /** Position in the list (0-indexed) */
2494
+ position: number;
2495
+ /** Section where the suggestion appeared */
2496
+ section?: 'suggestions' | 'trending' | 'recent' | 'related';
2497
+ /** Original query that triggered suggestions */
2498
+ query?: string;
2499
+ /** Total suggestions shown */
2500
+ totalSuggestions?: number;
2501
+ }
2502
+ interface ProductClickEventData {
2503
+ /** The clicked product */
2504
+ product: ProductItem;
2505
+ /** Position in the list (0-indexed) */
2506
+ position: number;
2507
+ /** Section where the product appeared */
2508
+ section?: 'products' | 'trending' | 'recommendations' | 'filtered_tab';
2509
+ /** Tab ID if from filtered tab */
2510
+ tabId?: string;
2511
+ /** Original query */
2512
+ query?: string;
2513
+ }
2514
+ interface SuggestionImpressionEventData {
2515
+ /** Suggestions that were shown */
2516
+ suggestions: SuggestionItem$2[];
2517
+ /** Products that were shown */
2518
+ products?: ProductItem[];
2519
+ /** Categories that were shown */
2520
+ categories?: SuggestionCategory[];
2521
+ /** Brands that were shown */
2522
+ brands?: PopularBrand[];
2523
+ /** Original query */
2524
+ query: string;
2525
+ /** Timestamp when impressions occurred */
2526
+ timestamp: number;
2527
+ }
2528
+ interface UseSuggestionsAnalyticsReturn {
2529
+ /** Track a suggestion click */
2530
+ trackSuggestionClick: (data: SuggestionClickEventData) => void;
2531
+ /** Track a product click from suggestions dropdown */
2532
+ trackProductClick: (data: ProductClickEventData) => void;
2533
+ /** Track a category click */
2534
+ trackCategoryClick: (category: SuggestionCategory, query?: string) => void;
2535
+ /** Track a brand click */
2536
+ trackBrandClick: (brand: PopularBrand, query?: string) => void;
2537
+ /** Track a tab selection */
2538
+ trackTabSelect: (tab: FilteredTab, query?: string) => void;
2539
+ /** Track recent search click */
2540
+ trackRecentSearchClick: (search: RecentSearch) => void;
2541
+ /** Track trending search click */
2542
+ trackTrendingClick: (trending: TrendingSearch, position: number) => void;
2543
+ /** Track suggestions impression */
2544
+ trackImpression: (data: SuggestionImpressionEventData) => void;
2545
+ /** Track search submission from suggestion */
2546
+ trackSearchSubmit: (query: string, fromSuggestion: boolean, suggestion?: SuggestionItem$2) => void;
2547
+ /** Track dropdown open */
2548
+ trackDropdownOpen: (query: string) => void;
2549
+ /** Track dropdown close */
2550
+ trackDropdownClose: (query: string, selectedSuggestion?: string) => void;
2551
+ }
2552
+ declare function useSuggestionsAnalytics(options: UseSuggestionsAnalyticsOptions): UseSuggestionsAnalyticsReturn;
2553
+
2554
+ /**
2555
+ * useAnalytics Hook
2556
+ *
2557
+ * Hook for tracking analytics events with the Seekora SDK
2558
+ */
2559
+
2560
+ interface UseAnalyticsOptions {
2561
+ client: SeekoraClient;
2562
+ enabled?: boolean;
2563
+ }
2564
+ interface UseAnalyticsReturn {
2565
+ trackEvent: (eventType: string, payload: Partial<DataTypesEventPayload>, context?: SearchContext | Partial<SearchContext>) => Promise<void>;
2566
+ trackClick: (resultId: string, result: any, context?: SearchContext | Partial<SearchContext>, position?: number) => Promise<void>;
2567
+ trackConversion: (resultId: string, result: any, value?: number, currency?: string, context?: SearchContext | Partial<SearchContext>) => Promise<void>;
2568
+ trackBatch: (events: (Partial<DataTypesEventPayload> & {
2569
+ event_name?: string;
2570
+ })[], context?: SearchContext) => Promise<void>;
2571
+ }
2572
+ declare const useAnalytics: ({ client, enabled, }: UseAnalyticsOptions) => UseAnalyticsReturn;
2573
+
2574
+ /**
2575
+ * useSearchState Hook
2576
+ *
2577
+ * React hook for accessing and managing search state via SearchStateManager
2578
+ * Provides reactive state and methods to update search parameters
2579
+ */
2580
+
2581
+ interface UseSearchStateReturn {
2582
+ query: string;
2583
+ refinements: Array<{
2584
+ field: string;
2585
+ value: string;
2586
+ }>;
2587
+ currentPage: number;
2588
+ itemsPerPage: number;
2589
+ sortBy?: string;
2590
+ results: SearchState['results'];
2591
+ loading: boolean;
2592
+ error: Error | null;
2593
+ setQuery: (query: string, triggerSearch?: boolean) => void;
2594
+ addRefinement: (field: string, value: string, triggerSearch?: boolean) => void;
2595
+ removeRefinement: (field: string, value: string, triggerSearch?: boolean) => void;
2596
+ clearRefinements: (triggerSearch?: boolean) => void;
2597
+ setPage: (page: number, triggerSearch?: boolean) => void;
2598
+ setSortBy: (sortBy: string, triggerSearch?: boolean) => void;
2599
+ search: (additionalOptions?: Parameters<SearchStateManager['search']>[0]) => Promise<SearchResponse | null>;
2600
+ clear: () => void;
2601
+ }
2602
+ /**
2603
+ * Hook to access and manage search state
2604
+ * Automatically subscribes to state changes and re-renders when state updates
2605
+ */
2606
+ declare const useSearchState: () => UseSearchStateReturn;
2607
+
2608
+ /**
2609
+ * useSmartSuggestions Hook
2610
+ *
2611
+ * AI-enhanced query suggestions with intent understanding
2612
+ * Provides context-aware suggestions based on user behavior and query patterns
2613
+ */
2614
+ interface SmartSuggestion {
2615
+ text: string;
2616
+ type: 'query' | 'correction' | 'expansion' | 'related' | 'trending';
2617
+ confidence: number;
2618
+ metadata?: {
2619
+ intent?: string;
2620
+ category?: string;
2621
+ correctedFrom?: string;
2622
+ expandedTo?: string[];
2623
+ };
2624
+ }
2625
+ interface SmartSuggestionsOptions {
2626
+ /** Minimum query length */
2627
+ minQueryLength?: number;
2628
+ /** Maximum suggestions to return */
2629
+ maxSuggestions?: number;
2630
+ /** Debounce delay in ms */
2631
+ debounceMs?: number;
2632
+ /** Enable spell correction */
2633
+ enableSpellCorrection?: boolean;
2634
+ /** Enable query expansion */
2635
+ enableQueryExpansion?: boolean;
2636
+ /** Enable intent detection */
2637
+ enableIntentDetection?: boolean;
2638
+ /** Include trending queries when query is empty */
2639
+ includeTrending?: boolean;
2640
+ /** User context for personalization */
2641
+ userContext?: {
2642
+ recentSearches?: string[];
2643
+ preferences?: Record<string, any>;
2644
+ };
2645
+ }
2646
+ interface UseSmartSuggestionsReturn {
2647
+ suggestions: SmartSuggestion[];
2648
+ loading: boolean;
2649
+ error: Error | null;
2650
+ /** Detected intent from the query */
2651
+ detectedIntent: string | null;
2652
+ /** Suggested corrections if query has typos */
2653
+ corrections: string[];
2654
+ /** Expanded query terms */
2655
+ expansions: string[];
2656
+ /** Process a query for smart suggestions */
2657
+ getSuggestions: (query: string) => Promise<SmartSuggestion[]>;
2658
+ /** Clear current suggestions */
2659
+ clear: () => void;
2660
+ }
2661
+ declare function useSmartSuggestions(query: string, options?: SmartSuggestionsOptions): UseSmartSuggestionsReturn;
2662
+
2663
+ /**
2664
+ * useNaturalLanguageFilters Hook
2665
+ *
2666
+ * Convert natural language queries to structured filters
2667
+ * Examples:
2668
+ * - "red shirts under $50" → color: red, category: shirts, price: <= 50
2669
+ * - "size large blue jeans" → size: L, color: blue, category: jeans
2670
+ */
2671
+ interface ParsedFilter {
2672
+ field: string;
2673
+ value: string;
2674
+ operator: '=' | '>' | '<' | '>=' | '<=' | 'contains';
2675
+ confidence: number;
2676
+ matchedText: string;
2677
+ }
2678
+ interface NaturalLanguageResult {
2679
+ /** Cleaned query with filter terms removed */
2680
+ cleanedQuery: string;
2681
+ /** Extracted filters */
2682
+ filters: ParsedFilter[];
2683
+ /** Original query */
2684
+ originalQuery: string;
2685
+ /** Whether any filters were detected */
2686
+ hasFilters: boolean;
2687
+ }
2688
+ interface NaturalLanguageFiltersOptions {
2689
+ /** Custom field mappings */
2690
+ fieldMappings?: Record<string, string>;
2691
+ /** Custom value mappings */
2692
+ valueMappings?: Record<string, Record<string, string>>;
2693
+ /** Whether to auto-apply filters to search state */
2694
+ autoApply?: boolean;
2695
+ /** Currency symbol for price parsing */
2696
+ currencySymbol?: string;
2697
+ }
2698
+ declare function useNaturalLanguageFilters(options?: NaturalLanguageFiltersOptions): {
2699
+ /** Parse a natural language query */
2700
+ parse: (query: string) => NaturalLanguageResult;
2701
+ /** Apply parsed filters to search state */
2702
+ applyFilters: (filters: ParsedFilter[]) => void;
2703
+ /** Parse and apply in one step */
2704
+ parseAndApply: (query: string) => NaturalLanguageResult;
2705
+ };
2706
+ /**
2707
+ * Utility to format parsed filters for display
2708
+ */
2709
+ declare function formatParsedFilters(filters: ParsedFilter[]): string;
2710
+
2711
+ /**
2712
+ * Default Theme
2713
+ */
2714
+
2715
+ declare const defaultTheme: Theme;
2716
+
2717
+ /**
2718
+ * Dark Theme
2719
+ */
2720
+
2721
+ declare const darkTheme: Theme;
2722
+
2723
+ /**
2724
+ * Minimal Theme
2725
+ */
2726
+
2727
+ declare const minimalTheme: Theme;
2728
+
2729
+ /**
2730
+ * Query Suggestions Theme System
2731
+ *
2732
+ * Provides comprehensive theming for query suggestions components including:
2733
+ * - CSS variables for easy customization
2734
+ * - Pre-built theme presets (light, dark, minimal, branded)
2735
+ * - Component-specific style generators
2736
+ * - Responsive utilities
2737
+ */
2738
+
2739
+ interface SuggestionsThemeVariables {
2740
+ '--seekora-bg-surface': string;
2741
+ '--seekora-bg-secondary': string;
2742
+ '--seekora-bg-tertiary': string;
2743
+ '--seekora-bg-hover': string;
2744
+ '--seekora-text-primary': string;
2745
+ '--seekora-text-secondary': string;
2746
+ '--seekora-text-tertiary': string;
2747
+ '--seekora-border-color': string;
2748
+ '--seekora-primary': string;
2749
+ '--seekora-primary-light': string;
2750
+ '--seekora-primary-dark': string;
2751
+ '--seekora-highlight-bg': string;
2752
+ '--seekora-success': string;
2753
+ '--seekora-warning': string;
2754
+ '--seekora-error': string;
2755
+ '--seekora-font-family': string;
2756
+ '--seekora-font-size-xs': string;
2757
+ '--seekora-font-size-sm': string;
2758
+ '--seekora-font-size-base': string;
2759
+ '--seekora-font-size-lg': string;
2760
+ '--seekora-font-weight-normal': string;
2761
+ '--seekora-font-weight-medium': string;
2762
+ '--seekora-font-weight-semibold': string;
2763
+ '--seekora-font-weight-bold': string;
2764
+ '--seekora-line-height-tight': string;
2765
+ '--seekora-line-height-normal': string;
2766
+ '--seekora-line-height-relaxed': string;
2767
+ '--seekora-spacing-xs': string;
2768
+ '--seekora-spacing-sm': string;
2769
+ '--seekora-spacing-md': string;
2770
+ '--seekora-spacing-lg': string;
2771
+ '--seekora-spacing-xl': string;
2772
+ '--seekora-border-radius-sm': string;
2773
+ '--seekora-border-radius': string;
2774
+ '--seekora-border-radius-lg': string;
2775
+ '--seekora-border-radius-xl': string;
2776
+ '--seekora-border-radius-full': string;
2777
+ '--seekora-shadow-sm': string;
2778
+ '--seekora-shadow': string;
2779
+ '--seekora-shadow-md': string;
2780
+ '--seekora-shadow-lg': string;
2781
+ '--seekora-shadow-xl': string;
2782
+ '--seekora-transition-fast': string;
2783
+ '--seekora-transition-normal': string;
2784
+ '--seekora-transition-slow': string;
2785
+ '--seekora-z-dropdown': string;
2786
+ '--seekora-z-modal': string;
2787
+ '--seekora-z-tooltip': string;
2788
+ }
2789
+ declare const lightThemeVariables: SuggestionsThemeVariables;
2790
+ declare const darkThemeVariables: SuggestionsThemeVariables;
2791
+ declare const minimalThemeVariables: SuggestionsThemeVariables;
2792
+ declare const brandPresets: {
2793
+ blue: {
2794
+ '--seekora-primary': string;
2795
+ '--seekora-primary-light': string;
2796
+ '--seekora-primary-dark': string;
2797
+ };
2798
+ green: {
2799
+ '--seekora-primary': string;
2800
+ '--seekora-primary-light': string;
2801
+ '--seekora-primary-dark': string;
2802
+ };
2803
+ purple: {
2804
+ '--seekora-primary': string;
2805
+ '--seekora-primary-light': string;
2806
+ '--seekora-primary-dark': string;
2807
+ };
2808
+ red: {
2809
+ '--seekora-primary': string;
2810
+ '--seekora-primary-light': string;
2811
+ '--seekora-primary-dark': string;
2812
+ };
2813
+ orange: {
2814
+ '--seekora-primary': string;
2815
+ '--seekora-primary-light': string;
2816
+ '--seekora-primary-dark': string;
2817
+ };
2818
+ teal: {
2819
+ '--seekora-primary': string;
2820
+ '--seekora-primary-light': string;
2821
+ '--seekora-primary-dark': string;
2822
+ };
2823
+ pink: {
2824
+ '--seekora-primary': string;
2825
+ '--seekora-primary-light': string;
2826
+ '--seekora-primary-dark': string;
2827
+ };
2828
+ };
2829
+ /**
2830
+ * Create a complete theme object from variables
2831
+ */
2832
+ declare function createSuggestionsTheme(baseTheme?: 'light' | 'dark' | 'minimal', overrides?: Partial<SuggestionsThemeVariables>, brandColor?: keyof typeof brandPresets): SuggestionsThemeVariables;
2833
+ /**
2834
+ * Generate complete CSS stylesheet for suggestions components
2835
+ */
2836
+ declare function generateSuggestionsStylesheet(theme?: SuggestionsThemeVariables): string;
2837
+ /**
2838
+ * Inject suggestions styles into the document
2839
+ */
2840
+ declare function injectSuggestionsStyles(theme?: SuggestionsThemeVariables, force?: boolean): void;
2841
+ /**
2842
+ * Update injected styles with new theme
2843
+ */
2844
+ declare function updateSuggestionsStyles(theme: SuggestionsThemeVariables): void;
2845
+
2846
+ declare const createTheme: (config: ThemeConfig) => _seekora_ai_ui_sdk_types.Theme;
2847
+
2848
+ export { AmazonDropdown, Breadcrumb, ClearRefinements, CurrentRefinements, Facets, FederatedDropdown, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight, HitsPerPage, InfiniteHits, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchLayout, SearchProvider, SearchResults, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionSearchBar, SuggestionsCache, TrendingItems, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBrand, extractCategory, extractProduct, extractSuggestion, formatParsedFilters, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getRecentSearches, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, minimalTheme, minimalThemeVariables, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useInjectResponsiveStyles, useNaturalLanguageFilters, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics };
2849
+ export type { AnalyticsConfig, BaseDropdownProps, BrandFieldMapping, BreadcrumbItem, BreadcrumbProps, BreadcrumbTheme, CategoryFieldMapping, ClearRefinementsProps, ClearRefinementsTheme, DropdownClassNames, DropdownEventHandlers, DropdownRef, DropdownThemeConfig, FederatedDropdownProps, FederatedDropdownRef, FrequentlyBoughtTogetherProps, HierarchicalMenuItem, HierarchicalMenuProps, HierarchicalMenuTheme, HighlightProps, HighlightTheme, HitsPerPageItem, HitsPerPageProps, HitsPerPageTheme, InfiniteHitsProps, InfiniteHitsTheme, MobileFiltersButtonProps, MobileFiltersProps, MobileFiltersTheme, NaturalLanguageFiltersOptions, NaturalLanguageResult, NavigableItem, ParsedFilter, ProductClickEventData, ProductDisplayConfig, ProductFieldMapping, QuerySuggestionsDropdownProps, QuerySuggestionsDropdownRef, QuerySuggestionsProps, QuerySuggestionsTheme, RangeSliderProps, RangeSliderTheme, RecentlyViewedProps, RecommendationItem, RecommendationTheme, RelatedProductsProps, ResponsiveState, RichQuerySuggestionsProps, RichQuerySuggestionsRef, SearchBarProps, SearchBarTheme, SearchBarWithSuggestionsProps, SearchBarWithSuggestionsRef, SearchProviderProps, SearchResultsProps, SearchResultsTheme, SectionConfig, SmartSuggestion, SmartSuggestionsOptions, SnippetProps, SnippetTheme, SuggestionClickEventData, SuggestionDisplayConfig, SuggestionDropdownVariant, SuggestionFieldMapping, SuggestionImpressionEventData, SuggestionItem$1 as SuggestionItem, SuggestionSearchBarProps, SuggestionSearchBarRef, SuggestionsThemeVariables, TrendingItemsProps, UseQuerySuggestionsEnhancedOptions, UseQuerySuggestionsEnhancedReturn, UseSmartSuggestionsReturn, UseSuggestionsAnalyticsOptions, UseSuggestionsAnalyticsReturn };