@seekora-ai/ui-sdk-react 0.0.0-stage-20260517092419
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Breadcrumb.d.ts +43 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Breadcrumb.js +119 -0
- package/dist/components/ClearRefinements.d.ts +42 -0
- package/dist/components/ClearRefinements.d.ts.map +1 -0
- package/dist/components/ClearRefinements.js +81 -0
- package/dist/components/CurrentRefinements.d.ts +63 -0
- package/dist/components/CurrentRefinements.d.ts.map +1 -0
- package/dist/components/CurrentRefinements.js +302 -0
- package/dist/components/FacetDropdown.d.ts +94 -0
- package/dist/components/FacetDropdown.d.ts.map +1 -0
- package/dist/components/FacetDropdown.js +396 -0
- package/dist/components/Facets.d.ts +118 -0
- package/dist/components/Facets.d.ts.map +1 -0
- package/dist/components/Facets.js +785 -0
- package/dist/components/FederatedDropdown.d.ts +98 -0
- package/dist/components/FederatedDropdown.d.ts.map +1 -0
- package/dist/components/FederatedDropdown.js +526 -0
- package/dist/components/HierarchicalMenu.d.ts +55 -0
- package/dist/components/HierarchicalMenu.d.ts.map +1 -0
- package/dist/components/HierarchicalMenu.js +276 -0
- package/dist/components/Highlight.d.ts +51 -0
- package/dist/components/Highlight.d.ts.map +1 -0
- package/dist/components/Highlight.js +155 -0
- package/dist/components/HitsPerPage.d.ts +41 -0
- package/dist/components/HitsPerPage.d.ts.map +1 -0
- package/dist/components/HitsPerPage.js +82 -0
- package/dist/components/InfiniteHits.d.ts +51 -0
- package/dist/components/InfiniteHits.d.ts.map +1 -0
- package/dist/components/InfiniteHits.js +173 -0
- package/dist/components/MobileFilters.d.ts +71 -0
- package/dist/components/MobileFilters.d.ts.map +1 -0
- package/dist/components/MobileFilters.js +242 -0
- package/dist/components/Pagination.d.ts +90 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination.js +298 -0
- package/dist/components/QuerySuggestions.d.ts +36 -0
- package/dist/components/QuerySuggestions.d.ts.map +1 -0
- package/dist/components/QuerySuggestions.js +71 -0
- package/dist/components/QuerySuggestionsDropdown.d.ts +82 -0
- package/dist/components/QuerySuggestionsDropdown.d.ts.map +1 -0
- package/dist/components/QuerySuggestionsDropdown.js +394 -0
- package/dist/components/RangeInput.d.ts +58 -0
- package/dist/components/RangeInput.d.ts.map +1 -0
- package/dist/components/RangeInput.js +203 -0
- package/dist/components/RangeSlider.d.ts +51 -0
- package/dist/components/RangeSlider.d.ts.map +1 -0
- package/dist/components/RangeSlider.js +262 -0
- package/dist/components/Recommendations.d.ts +89 -0
- package/dist/components/Recommendations.d.ts.map +1 -0
- package/dist/components/Recommendations.js +256 -0
- package/dist/components/RichQuerySuggestions.d.ts +88 -0
- package/dist/components/RichQuerySuggestions.d.ts.map +1 -0
- package/dist/components/RichQuerySuggestions.js +498 -0
- package/dist/components/SearchBar.d.ts +57 -0
- package/dist/components/SearchBar.d.ts.map +1 -0
- package/dist/components/SearchBar.js +361 -0
- package/dist/components/SearchBarWithSuggestions.d.ts +105 -0
- package/dist/components/SearchBarWithSuggestions.d.ts.map +1 -0
- package/dist/components/SearchBarWithSuggestions.js +275 -0
- package/dist/components/SearchLayout.d.ts +35 -0
- package/dist/components/SearchLayout.d.ts.map +1 -0
- package/dist/components/SearchLayout.js +61 -0
- package/dist/components/SearchProvider.d.ts +35 -0
- package/dist/components/SearchProvider.d.ts.map +1 -0
- package/dist/components/SearchProvider.js +53 -0
- package/dist/components/SearchResults.d.ts +57 -0
- package/dist/components/SearchResults.d.ts.map +1 -0
- package/dist/components/SearchResults.js +456 -0
- package/dist/components/SortBy.d.ts +84 -0
- package/dist/components/SortBy.d.ts.map +1 -0
- package/dist/components/SortBy.js +183 -0
- package/dist/components/Stats.d.ts +51 -0
- package/dist/components/Stats.d.ts.map +1 -0
- package/dist/components/Stats.js +201 -0
- package/dist/components/primitives/ActionButtons.d.ts +27 -0
- package/dist/components/primitives/ActionButtons.d.ts.map +1 -0
- package/dist/components/primitives/ActionButtons.js +102 -0
- package/dist/components/primitives/AnalyticsProvider.d.ts +22 -0
- package/dist/components/primitives/AnalyticsProvider.d.ts.map +1 -0
- package/dist/components/primitives/AnalyticsProvider.js +87 -0
- package/dist/components/primitives/BadgeList.d.ts +14 -0
- package/dist/components/primitives/BadgeList.d.ts.map +1 -0
- package/dist/components/primitives/BadgeList.js +65 -0
- package/dist/components/primitives/CustomSelect.d.ts +40 -0
- package/dist/components/primitives/CustomSelect.d.ts.map +1 -0
- package/dist/components/primitives/CustomSelect.js +196 -0
- package/dist/components/primitives/ImageDisplay.d.ts +28 -0
- package/dist/components/primitives/ImageDisplay.d.ts.map +1 -0
- package/dist/components/primitives/ImageDisplay.js +127 -0
- package/dist/components/primitives/ImageZoom.d.ts +33 -0
- package/dist/components/primitives/ImageZoom.d.ts.map +1 -0
- package/dist/components/primitives/ImageZoom.js +433 -0
- package/dist/components/primitives/PriceDisplay.d.ts +21 -0
- package/dist/components/primitives/PriceDisplay.d.ts.map +1 -0
- package/dist/components/primitives/PriceDisplay.js +44 -0
- package/dist/components/primitives/RatingDisplay.d.ts +43 -0
- package/dist/components/primitives/RatingDisplay.d.ts.map +1 -0
- package/dist/components/primitives/RatingDisplay.js +114 -0
- package/dist/components/primitives/VariantSelector.d.ts +30 -0
- package/dist/components/primitives/VariantSelector.d.ts.map +1 -0
- package/dist/components/primitives/VariantSelector.js +155 -0
- package/dist/components/primitives/VariantSwatches.d.ts +28 -0
- package/dist/components/primitives/VariantSwatches.d.ts.map +1 -0
- package/dist/components/primitives/VariantSwatches.js +188 -0
- package/dist/components/primitives/index.d.ts +12 -0
- package/dist/components/primitives/index.d.ts.map +1 -0
- package/dist/components/primitives/index.js +11 -0
- package/dist/components/primitives/withAnalytics.d.ts +24 -0
- package/dist/components/primitives/withAnalytics.d.ts.map +1 -0
- package/dist/components/primitives/withAnalytics.js +73 -0
- package/dist/components/product-page/ProductGallery.d.ts +26 -0
- package/dist/components/product-page/ProductGallery.d.ts.map +1 -0
- package/dist/components/product-page/ProductGallery.js +13 -0
- package/dist/components/product-page/ProductInfo.d.ts +44 -0
- package/dist/components/product-page/ProductInfo.d.ts.map +1 -0
- package/dist/components/product-page/ProductInfo.js +34 -0
- package/dist/components/product-page/ProductRecommendations.d.ts +21 -0
- package/dist/components/product-page/ProductRecommendations.d.ts.map +1 -0
- package/dist/components/product-page/ProductRecommendations.js +17 -0
- package/dist/components/product-page/index.d.ts +4 -0
- package/dist/components/product-page/index.d.ts.map +1 -0
- package/dist/components/product-page/index.js +3 -0
- package/dist/components/section-primitives/SectionError.d.ts +11 -0
- package/dist/components/section-primitives/SectionError.d.ts.map +1 -0
- package/dist/components/section-primitives/SectionError.js +13 -0
- package/dist/components/section-primitives/SectionItemGrid.d.ts +18 -0
- package/dist/components/section-primitives/SectionItemGrid.d.ts.map +1 -0
- package/dist/components/section-primitives/SectionItemGrid.js +14 -0
- package/dist/components/section-primitives/SectionLoading.d.ts +11 -0
- package/dist/components/section-primitives/SectionLoading.d.ts.map +1 -0
- package/dist/components/section-primitives/SectionLoading.js +11 -0
- package/dist/components/section-primitives/SectionSearchContext.d.ts +17 -0
- package/dist/components/section-primitives/SectionSearchContext.d.ts.map +1 -0
- package/dist/components/section-primitives/SectionSearchContext.js +17 -0
- package/dist/components/section-primitives/SectionSearchProvider.d.ts +25 -0
- package/dist/components/section-primitives/SectionSearchProvider.d.ts.map +1 -0
- package/dist/components/section-primitives/SectionSearchProvider.js +106 -0
- package/dist/components/section-primitives/index.d.ts +5 -0
- package/dist/components/section-primitives/index.d.ts.map +1 -0
- package/dist/components/section-primitives/index.js +4 -0
- package/dist/components/suggestions/AmazonDropdown.d.ts +30 -0
- package/dist/components/suggestions/AmazonDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/AmazonDropdown.js +509 -0
- package/dist/components/suggestions/GoogleDropdown.d.ts +31 -0
- package/dist/components/suggestions/GoogleDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/GoogleDropdown.js +349 -0
- package/dist/components/suggestions/MinimalDropdown.d.ts +24 -0
- package/dist/components/suggestions/MinimalDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/MinimalDropdown.js +312 -0
- package/dist/components/suggestions/MobileSheetDropdown.d.ts +31 -0
- package/dist/components/suggestions/MobileSheetDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/MobileSheetDropdown.js +483 -0
- package/dist/components/suggestions/PinterestDropdown.d.ts +29 -0
- package/dist/components/suggestions/PinterestDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/PinterestDropdown.js +446 -0
- package/dist/components/suggestions/ShopifyDropdown.d.ts +27 -0
- package/dist/components/suggestions/ShopifyDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/ShopifyDropdown.js +448 -0
- package/dist/components/suggestions/SpotlightDropdown.d.ts +33 -0
- package/dist/components/suggestions/SpotlightDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/SpotlightDropdown.js +544 -0
- package/dist/components/suggestions/SuggestionSearchBar.d.ts +127 -0
- package/dist/components/suggestions/SuggestionSearchBar.d.ts.map +1 -0
- package/dist/components/suggestions/SuggestionSearchBar.js +644 -0
- package/dist/components/suggestions/index.d.ts +37 -0
- package/dist/components/suggestions/index.d.ts.map +1 -0
- package/dist/components/suggestions/index.js +59 -0
- package/dist/components/suggestions/styles/index.d.ts +11 -0
- package/dist/components/suggestions/styles/index.d.ts.map +1 -0
- package/dist/components/suggestions/styles/index.js +289 -0
- package/dist/components/suggestions/styles/responsive.d.ts +107 -0
- package/dist/components/suggestions/styles/responsive.d.ts.map +1 -0
- package/dist/components/suggestions/styles/responsive.js +237 -0
- package/dist/components/suggestions/types.d.ts +511 -0
- package/dist/components/suggestions/types.d.ts.map +1 -0
- package/dist/components/suggestions/types.js +6 -0
- package/dist/components/suggestions/utils.d.ts +259 -0
- package/dist/components/suggestions/utils.d.ts.map +1 -0
- package/dist/components/suggestions/utils.js +668 -0
- package/dist/components/suggestions-primitives/CategoriesTabs.d.ts +13 -0
- package/dist/components/suggestions-primitives/CategoriesTabs.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/CategoriesTabs.js +35 -0
- package/dist/components/suggestions-primitives/DropdownPanel.d.ts +24 -0
- package/dist/components/suggestions-primitives/DropdownPanel.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/DropdownPanel.js +67 -0
- package/dist/components/suggestions-primitives/ItemCard.d.ts +48 -0
- package/dist/components/suggestions-primitives/ItemCard.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/ItemCard.js +103 -0
- package/dist/components/suggestions-primitives/ItemGrid.d.ts +28 -0
- package/dist/components/suggestions-primitives/ItemGrid.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/ItemGrid.js +55 -0
- package/dist/components/suggestions-primitives/ProductCard.d.ts +45 -0
- package/dist/components/suggestions-primitives/ProductCard.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/ProductCard.js +177 -0
- package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts +44 -0
- package/dist/components/suggestions-primitives/ProductCardLayouts.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/ProductCardLayouts.js +137 -0
- package/dist/components/suggestions-primitives/ProductGrid.d.ts +22 -0
- package/dist/components/suggestions-primitives/ProductGrid.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/ProductGrid.js +41 -0
- package/dist/components/suggestions-primitives/RecentSearchesList.d.ts +17 -0
- package/dist/components/suggestions-primitives/RecentSearchesList.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/RecentSearchesList.js +46 -0
- package/dist/components/suggestions-primitives/SearchInput.d.ts +23 -0
- package/dist/components/suggestions-primitives/SearchInput.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SearchInput.js +114 -0
- package/dist/components/suggestions-primitives/SuggestionItem.d.ts +31 -0
- package/dist/components/suggestions-primitives/SuggestionItem.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SuggestionItem.js +47 -0
- package/dist/components/suggestions-primitives/SuggestionList.d.ts +26 -0
- package/dist/components/suggestions-primitives/SuggestionList.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SuggestionList.js +35 -0
- package/dist/components/suggestions-primitives/SuggestionsContext.d.ts +44 -0
- package/dist/components/suggestions-primitives/SuggestionsContext.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SuggestionsContext.js +18 -0
- package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.d.ts +24 -0
- package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SuggestionsDropdownComposition.js +30 -0
- package/dist/components/suggestions-primitives/SuggestionsError.d.ts +11 -0
- package/dist/components/suggestions-primitives/SuggestionsError.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SuggestionsError.js +19 -0
- package/dist/components/suggestions-primitives/SuggestionsLoading.d.ts +11 -0
- package/dist/components/suggestions-primitives/SuggestionsLoading.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SuggestionsLoading.js +17 -0
- package/dist/components/suggestions-primitives/SuggestionsProvider.d.ts +38 -0
- package/dist/components/suggestions-primitives/SuggestionsProvider.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/SuggestionsProvider.js +259 -0
- package/dist/components/suggestions-primitives/TrendingList.d.ts +17 -0
- package/dist/components/suggestions-primitives/TrendingList.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/TrendingList.js +48 -0
- package/dist/components/suggestions-primitives/highlightMarkup.d.ts +31 -0
- package/dist/components/suggestions-primitives/highlightMarkup.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/highlightMarkup.js +70 -0
- package/dist/components/suggestions-primitives/index.d.ts +39 -0
- package/dist/components/suggestions-primitives/index.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/index.js +24 -0
- package/dist/docsearch/components/DocSearch.d.ts +4 -0
- package/dist/docsearch/components/DocSearch.d.ts.map +1 -0
- package/dist/docsearch/components/DocSearch.js +93 -0
- package/dist/docsearch/components/DocSearchButton.d.ts +4 -0
- package/dist/docsearch/components/DocSearchButton.d.ts.map +1 -0
- package/dist/docsearch/components/DocSearchButton.js +12 -0
- package/dist/docsearch/components/Footer.d.ts +8 -0
- package/dist/docsearch/components/Footer.d.ts.map +1 -0
- package/dist/docsearch/components/Footer.js +40 -0
- package/dist/docsearch/components/Highlight.d.ts +9 -0
- package/dist/docsearch/components/Highlight.d.ts.map +1 -0
- package/dist/docsearch/components/Highlight.js +48 -0
- package/dist/docsearch/components/Hit.d.ts +15 -0
- package/dist/docsearch/components/Hit.d.ts.map +1 -0
- package/dist/docsearch/components/Hit.js +96 -0
- package/dist/docsearch/components/Modal.d.ts +10 -0
- package/dist/docsearch/components/Modal.d.ts.map +1 -0
- package/dist/docsearch/components/Modal.js +57 -0
- package/dist/docsearch/components/Results.d.ts +23 -0
- package/dist/docsearch/components/Results.d.ts.map +1 -0
- package/dist/docsearch/components/Results.js +141 -0
- package/dist/docsearch/components/SearchBox.d.ts +11 -0
- package/dist/docsearch/components/SearchBox.d.ts.map +1 -0
- package/dist/docsearch/components/SearchBox.js +16 -0
- package/dist/docsearch/hooks/useDocSearch.d.ts +33 -0
- package/dist/docsearch/hooks/useDocSearch.d.ts.map +1 -0
- package/dist/docsearch/hooks/useDocSearch.js +224 -0
- package/dist/docsearch/hooks/useKeyboard.d.ts +17 -0
- package/dist/docsearch/hooks/useKeyboard.d.ts.map +1 -0
- package/dist/docsearch/hooks/useKeyboard.js +71 -0
- package/dist/docsearch/hooks/useSeekoraSearch.d.ts +27 -0
- package/dist/docsearch/hooks/useSeekoraSearch.d.ts.map +1 -0
- package/dist/docsearch/hooks/useSeekoraSearch.js +213 -0
- package/dist/docsearch/index.d.ts +13 -0
- package/dist/docsearch/index.d.ts.map +1 -0
- package/dist/docsearch/index.js +11 -0
- package/dist/docsearch/types.d.ts +175 -0
- package/dist/docsearch/types.d.ts.map +1 -0
- package/dist/docsearch/types.js +4 -0
- package/dist/docsearch.css +234 -0
- package/dist/hooks/useAnalytics.d.ts +24 -0
- package/dist/hooks/useAnalytics.d.ts.map +1 -0
- package/dist/hooks/useAnalytics.js +67 -0
- package/dist/hooks/useClickTracking.d.ts +36 -0
- package/dist/hooks/useClickTracking.d.ts.map +1 -0
- package/dist/hooks/useClickTracking.js +89 -0
- package/dist/hooks/useExperiment.d.ts +25 -0
- package/dist/hooks/useExperiment.d.ts.map +1 -0
- package/dist/hooks/useExperiment.js +123 -0
- package/dist/hooks/useFilters.d.ts +27 -0
- package/dist/hooks/useFilters.d.ts.map +1 -0
- package/dist/hooks/useFilters.js +86 -0
- package/dist/hooks/useKeyboardNavigation.d.ts +51 -0
- package/dist/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/hooks/useKeyboardNavigation.js +113 -0
- package/dist/hooks/useNaturalLanguageFilters.d.ts +48 -0
- package/dist/hooks/useNaturalLanguageFilters.d.ts.map +1 -0
- package/dist/hooks/useNaturalLanguageFilters.js +221 -0
- package/dist/hooks/useProductAnalytics.d.ts +49 -0
- package/dist/hooks/useProductAnalytics.d.ts.map +1 -0
- package/dist/hooks/useProductAnalytics.js +116 -0
- package/dist/hooks/useQuerySuggestions.d.ts +21 -0
- package/dist/hooks/useQuerySuggestions.d.ts.map +1 -0
- package/dist/hooks/useQuerySuggestions.js +84 -0
- package/dist/hooks/useQuerySuggestionsEnhanced.d.ts +120 -0
- package/dist/hooks/useQuerySuggestionsEnhanced.d.ts.map +1 -0
- package/dist/hooks/useQuerySuggestionsEnhanced.js +444 -0
- package/dist/hooks/useSearchState.d.ts +35 -0
- package/dist/hooks/useSearchState.d.ts.map +1 -0
- package/dist/hooks/useSearchState.js +68 -0
- package/dist/hooks/useSeekoraSearch.d.ts +20 -0
- package/dist/hooks/useSeekoraSearch.d.ts.map +1 -0
- package/dist/hooks/useSeekoraSearch.js +63 -0
- package/dist/hooks/useSmartSuggestions.d.ts +55 -0
- package/dist/hooks/useSmartSuggestions.d.ts.map +1 -0
- package/dist/hooks/useSmartSuggestions.js +236 -0
- package/dist/hooks/useSuggestionsAnalytics.d.ts +93 -0
- package/dist/hooks/useSuggestionsAnalytics.d.ts.map +1 -0
- package/dist/hooks/useSuggestionsAnalytics.js +239 -0
- package/dist/hooks/useVariantSelection.d.ts +28 -0
- package/dist/hooks/useVariantSelection.d.ts.map +1 -0
- package/dist/hooks/useVariantSelection.js +44 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +110 -0
- package/dist/index.umd.js +1 -0
- package/dist/src/index.d.ts +4469 -0
- package/dist/src/index.esm.js +18952 -0
- package/dist/src/index.esm.js.map +1 -0
- package/dist/src/index.js +19086 -0
- package/dist/src/index.js.map +1 -0
- package/dist/themes/createTheme.d.ts +8 -0
- package/dist/themes/createTheme.d.ts.map +1 -0
- package/dist/themes/createTheme.js +10 -0
- package/dist/themes/dark.d.ts +6 -0
- package/dist/themes/dark.d.ts.map +1 -0
- package/dist/themes/dark.js +34 -0
- package/dist/themes/default.d.ts +6 -0
- package/dist/themes/default.d.ts.map +1 -0
- package/dist/themes/default.js +71 -0
- package/dist/themes/mergeThemes.d.ts +7 -0
- package/dist/themes/mergeThemes.d.ts.map +1 -0
- package/dist/themes/mergeThemes.js +6 -0
- package/dist/themes/minimal.d.ts +6 -0
- package/dist/themes/minimal.d.ts.map +1 -0
- package/dist/themes/minimal.js +34 -0
- package/dist/themes/suggestions.d.ts +216 -0
- package/dist/themes/suggestions.d.ts.map +1 -0
- package/dist/themes/suggestions.js +546 -0
- package/dist/themes/types.d.ts +7 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +6 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/utils/responsive.d.ts +130 -0
- package/dist/utils/responsive.d.ts.map +1 -0
- package/dist/utils/responsive.js +225 -0
- package/package.json +68 -0
- package/src/docsearch/docsearch.css +234 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionList – container for text suggestions (primitive)
|
|
3
|
+
*
|
|
4
|
+
* Renders list of SuggestionItem from context; uses activeIndex for highlight.
|
|
5
|
+
* Optional renderItem. When not using renderItem, enableHighlightMarkup and
|
|
6
|
+
* highlightMarkupOptions control parsing of <mark>...</mark> in suggestion text.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { useSuggestionsContext } from './SuggestionsContext';
|
|
10
|
+
import { SuggestionItem } from './SuggestionItem';
|
|
11
|
+
import { clsx } from 'clsx';
|
|
12
|
+
const listStyle = {
|
|
13
|
+
margin: 0,
|
|
14
|
+
padding: '4px 0',
|
|
15
|
+
};
|
|
16
|
+
export function SuggestionList({ maxItems = 10, className, style, listClassName, enableHighlightMarkup = true, highlightMarkupOptions, renderItem, }) {
|
|
17
|
+
const { suggestions, activeIndex, loading, selectSuggestion, getAllNavigableItems, } = useSuggestionsContext();
|
|
18
|
+
const items = suggestions.slice(0, maxItems);
|
|
19
|
+
const navigableItems = getAllNavigableItems();
|
|
20
|
+
const suggestionStartIndex = navigableItems.findIndex((n) => n.type === 'suggestion');
|
|
21
|
+
const activeIsInSuggestions = suggestionStartIndex >= 0 && activeIndex >= suggestionStartIndex && activeIndex < suggestionStartIndex + items.length;
|
|
22
|
+
// When loading with previous results, show previous results (no loading UI)
|
|
23
|
+
if (items.length === 0)
|
|
24
|
+
return null;
|
|
25
|
+
return (React.createElement("div", { className: clsx('seekora-suggestions-list', className), style: style },
|
|
26
|
+
React.createElement("ul", { className: clsx('seekora-suggestions-list-ul', listClassName), style: listStyle, role: "listbox" }, items.map((suggestion, i) => {
|
|
27
|
+
const globalIndex = suggestionStartIndex >= 0 ? suggestionStartIndex + i : i;
|
|
28
|
+
const isActive = activeIsInSuggestions && activeIndex === globalIndex;
|
|
29
|
+
const onSelect = () => selectSuggestion(suggestion, globalIndex);
|
|
30
|
+
if (renderItem) {
|
|
31
|
+
return (React.createElement("li", { key: suggestion.objectID ?? suggestion.query ?? i, role: "option" }, renderItem(suggestion, globalIndex, isActive, onSelect)));
|
|
32
|
+
}
|
|
33
|
+
return (React.createElement(SuggestionItem, { key: suggestion.objectID ?? suggestion.query ?? i, suggestion: suggestion, index: globalIndex, isActive: isActive, onSelect: onSelect, enableHighlightMarkup: enableHighlightMarkup, highlightMarkupOptions: highlightMarkupOptions }));
|
|
34
|
+
}))));
|
|
35
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Suggestions Context
|
|
3
|
+
*
|
|
4
|
+
* Type definitions and React context for composable suggestions primitives.
|
|
5
|
+
* Consuming components use useSuggestionsContext() for state and actions.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { SuggestionItem, ProductItem, RecentSearch, TrendingSearch, FilteredTab } from '@seekora-ai/ui-sdk-types';
|
|
9
|
+
import type { NavigableItem } from '../../hooks/useQuerySuggestionsEnhanced';
|
|
10
|
+
export interface SuggestionsContextValue {
|
|
11
|
+
query: string;
|
|
12
|
+
setQuery: (query: string) => void;
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
setIsOpen: (open: boolean) => void;
|
|
15
|
+
activeIndex: number;
|
|
16
|
+
setActiveIndex: (index: number) => void;
|
|
17
|
+
suggestions: SuggestionItem[];
|
|
18
|
+
recentSearches: RecentSearch[];
|
|
19
|
+
trendingSearches: TrendingSearch[];
|
|
20
|
+
trendingProducts: ProductItem[];
|
|
21
|
+
/** Products prefetched on mount via client.search("*") — available before dropdown opens */
|
|
22
|
+
prefetchedProducts: unknown[];
|
|
23
|
+
filteredTabs: FilteredTab[];
|
|
24
|
+
activeTabId: string;
|
|
25
|
+
setActiveTabId: (id: string) => void;
|
|
26
|
+
loading: boolean;
|
|
27
|
+
error: Error | null;
|
|
28
|
+
hasContent: boolean;
|
|
29
|
+
getAllNavigableItems: () => NavigableItem[];
|
|
30
|
+
selectSuggestion: (suggestion: SuggestionItem, position: number) => void;
|
|
31
|
+
selectProduct: (product: ProductItem, position: number, section?: string, tabId?: string) => void;
|
|
32
|
+
selectRecentSearch: (search: RecentSearch) => void;
|
|
33
|
+
selectTrendingSearch: (trending: TrendingSearch, position: number) => void;
|
|
34
|
+
setActiveTab: (tab: FilteredTab) => void;
|
|
35
|
+
submitSearch: (query: string, fromSuggestion?: boolean, suggestion?: SuggestionItem) => void;
|
|
36
|
+
clearRecentSearches: () => void;
|
|
37
|
+
close: () => void;
|
|
38
|
+
navigateNext: () => void;
|
|
39
|
+
navigatePrev: () => void;
|
|
40
|
+
selectActive: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare const SuggestionsContext: React.Context<SuggestionsContextValue | null>;
|
|
43
|
+
export declare function useSuggestionsContext(): SuggestionsContextValue;
|
|
44
|
+
//# sourceMappingURL=SuggestionsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionsContext.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SuggestionsContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,YAAY,EACZ,cAAc,EACd,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,WAAW,uBAAuB;IAEtC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,gBAAgB,EAAE,cAAc,EAAE,CAAC;IACnC,gBAAgB,EAAE,WAAW,EAAE,CAAC;IAChC,4FAA4F;IAC5F,kBAAkB,EAAE,OAAO,EAAE,CAAC;IAC9B,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,MAAM,aAAa,EAAE,CAAC;IAG5C,gBAAgB,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzE,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClG,kBAAkB,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACnD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,YAAY,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7F,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,KAAK,EAAE,MAAM,IAAI,CAAC;IAGlB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,+CAAsD,CAAC;AAEtF,wBAAgB,qBAAqB,IAAI,uBAAuB,CAQ/D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Suggestions Context
|
|
3
|
+
*
|
|
4
|
+
* Type definitions and React context for composable suggestions primitives.
|
|
5
|
+
* Consuming components use useSuggestionsContext() for state and actions.
|
|
6
|
+
*/
|
|
7
|
+
import { createContext, useContext } from 'react';
|
|
8
|
+
import { log } from '@seekora-ai/ui-sdk-core';
|
|
9
|
+
export const SuggestionsContext = createContext(null);
|
|
10
|
+
export function useSuggestionsContext() {
|
|
11
|
+
const context = useContext(SuggestionsContext);
|
|
12
|
+
if (!context) {
|
|
13
|
+
const error = new Error('useSuggestionsContext must be used within a SuggestionsProvider');
|
|
14
|
+
log.error('SuggestionsContext: not available', { error: error.message });
|
|
15
|
+
throw error;
|
|
16
|
+
}
|
|
17
|
+
return context;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsDropdownComposition – reference composition
|
|
3
|
+
*
|
|
4
|
+
* Example layout built from primitives: SearchInput + DropdownPanel containing
|
|
5
|
+
* RecentSearchesList (when query empty), SuggestionList, CategoriesTabs, ProductGrid, TrendingList.
|
|
6
|
+
* Wrap with SearchProvider and SuggestionsProvider. Use as reference or replace
|
|
7
|
+
* with your own arrangement of the same primitives.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import type { SuggestionsProviderProps } from './SuggestionsProvider';
|
|
11
|
+
export interface SuggestionsDropdownCompositionProps extends Omit<SuggestionsProviderProps, 'children'> {
|
|
12
|
+
/** Show recent searches when query is empty */
|
|
13
|
+
showRecentSearches?: boolean;
|
|
14
|
+
/** Show trending list */
|
|
15
|
+
showTrending?: boolean;
|
|
16
|
+
/** Show categories/filtered tabs */
|
|
17
|
+
showTabs?: boolean;
|
|
18
|
+
/** Show product grid */
|
|
19
|
+
showProducts?: boolean;
|
|
20
|
+
/** SearchInput placeholder */
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function SuggestionsDropdownComposition({ showRecentSearches, showTrending, showTabs, showProducts, placeholder, ...providerProps }: SuggestionsDropdownCompositionProps): React.JSX.Element;
|
|
24
|
+
//# sourceMappingURL=SuggestionsDropdownComposition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionsDropdownComposition.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SuggestionsDropdownComposition.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,MAAM,WAAW,mCAAoC,SAAQ,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC;IACrG,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yBAAyB;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,kBAAyB,EACzB,YAAmB,EACnB,QAAe,EACf,YAAmB,EACnB,WAAW,EACX,GAAG,aAAa,EACjB,EAAE,mCAAmC,qBAgBrC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsDropdownComposition – reference composition
|
|
3
|
+
*
|
|
4
|
+
* Example layout built from primitives: SearchInput + DropdownPanel containing
|
|
5
|
+
* RecentSearchesList (when query empty), SuggestionList, CategoriesTabs, ProductGrid, TrendingList.
|
|
6
|
+
* Wrap with SearchProvider and SuggestionsProvider. Use as reference or replace
|
|
7
|
+
* with your own arrangement of the same primitives.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { SuggestionsProvider } from './SuggestionsProvider';
|
|
11
|
+
import { SearchInput } from './SearchInput';
|
|
12
|
+
import { DropdownPanel } from './DropdownPanel';
|
|
13
|
+
import { RecentSearchesList } from './RecentSearchesList';
|
|
14
|
+
import { SuggestionList } from './SuggestionList';
|
|
15
|
+
import { CategoriesTabs } from './CategoriesTabs';
|
|
16
|
+
import { ProductGrid } from './ProductGrid';
|
|
17
|
+
import { TrendingList } from './TrendingList';
|
|
18
|
+
import { SuggestionsError } from './SuggestionsError';
|
|
19
|
+
export function SuggestionsDropdownComposition({ showRecentSearches = true, showTrending = true, showTabs = true, showProducts = true, placeholder, ...providerProps }) {
|
|
20
|
+
return (React.createElement(SuggestionsProvider, { ...providerProps },
|
|
21
|
+
React.createElement("div", { className: "seekora-suggestions-dropdown-composition", style: { position: 'relative', width: '100%' } },
|
|
22
|
+
React.createElement(SearchInput, { placeholder: placeholder }),
|
|
23
|
+
React.createElement(DropdownPanel, null,
|
|
24
|
+
React.createElement(SuggestionsError, null),
|
|
25
|
+
showRecentSearches ? React.createElement(RecentSearchesList, null) : null,
|
|
26
|
+
React.createElement(SuggestionList, null),
|
|
27
|
+
showTabs ? React.createElement(CategoriesTabs, null) : null,
|
|
28
|
+
showProducts ? React.createElement(ProductGrid, null) : null,
|
|
29
|
+
showTrending ? React.createElement(TrendingList, null) : null))));
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsError – error message (primitive)
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface SuggestionsErrorProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
render?: (error: Error) => React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function SuggestionsError({ className, style, render }: SuggestionsErrorProps): React.JSX.Element | null;
|
|
11
|
+
//# sourceMappingURL=SuggestionsError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionsError.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SuggestionsError.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;CAC5C;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,qBAAqB,4BAmBnF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsError – error message (primitive)
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useSuggestionsContext } from './SuggestionsContext';
|
|
6
|
+
import { clsx } from 'clsx';
|
|
7
|
+
export function SuggestionsError({ className, style, render }) {
|
|
8
|
+
const { error } = useSuggestionsContext();
|
|
9
|
+
if (!error)
|
|
10
|
+
return null;
|
|
11
|
+
if (render)
|
|
12
|
+
return React.createElement(React.Fragment, null, render(error));
|
|
13
|
+
return (React.createElement("div", { className: clsx('seekora-suggestions-error', className), style: {
|
|
14
|
+
padding: 16,
|
|
15
|
+
color: 'var(--seekora-error, #dc2626)',
|
|
16
|
+
fontSize: '0.875rem',
|
|
17
|
+
...style,
|
|
18
|
+
} }, error.message));
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsLoading – loading indicator (primitive)
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface SuggestionsLoadingProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
text?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function SuggestionsLoading({ className, style, text }: SuggestionsLoadingProps): React.JSX.Element | null;
|
|
11
|
+
//# sourceMappingURL=SuggestionsLoading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionsLoading.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SuggestionsLoading.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAmB,EAAE,EAAE,uBAAuB,4BAiBpG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsLoading – loading indicator (primitive)
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { useSuggestionsContext } from './SuggestionsContext';
|
|
6
|
+
import { clsx } from 'clsx';
|
|
7
|
+
export function SuggestionsLoading({ className, style, text = 'Loading...' }) {
|
|
8
|
+
const { loading } = useSuggestionsContext();
|
|
9
|
+
if (!loading)
|
|
10
|
+
return null;
|
|
11
|
+
return (React.createElement("div", { className: clsx('seekora-suggestions-loading', className), style: {
|
|
12
|
+
padding: 16,
|
|
13
|
+
color: 'var(--seekora-text-secondary, #6b7280)',
|
|
14
|
+
fontSize: '0.875rem',
|
|
15
|
+
...style,
|
|
16
|
+
} }, text));
|
|
17
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsProvider
|
|
3
|
+
*
|
|
4
|
+
* Provides suggestions state (query, suggestions, products, recent, trending, tabs),
|
|
5
|
+
* actions (selectSuggestion, selectProduct, submitSearch, etc.), and keyboard navigation.
|
|
6
|
+
* Uses useQuerySuggestionsEnhanced and useSuggestionsAnalytics; must be inside SearchProvider.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import type { SuggestionItem, ProductItem } from '@seekora-ai/ui-sdk-types';
|
|
10
|
+
export interface SuggestionsProviderProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/** Min query length to fetch suggestions */
|
|
13
|
+
minQueryLength?: number;
|
|
14
|
+
/** Debounce ms for suggestion fetch */
|
|
15
|
+
debounceMs?: number;
|
|
16
|
+
/** Max suggestions */
|
|
17
|
+
maxSuggestions?: number;
|
|
18
|
+
/** Include dropdown recommendations (trending, products, etc.) */
|
|
19
|
+
includeDropdownRecommendations?: boolean;
|
|
20
|
+
/** Filtered tabs config */
|
|
21
|
+
filteredTabs?: Array<{
|
|
22
|
+
id?: string;
|
|
23
|
+
label: string;
|
|
24
|
+
filter: string;
|
|
25
|
+
}>;
|
|
26
|
+
/** Enable analytics (V3) */
|
|
27
|
+
enableAnalytics?: boolean;
|
|
28
|
+
/** Analytics tags */
|
|
29
|
+
analyticsTags?: string[];
|
|
30
|
+
/** Callback when user submits search (e.g. navigate to results page) */
|
|
31
|
+
onSearch?: (query: string) => void;
|
|
32
|
+
/** Callback when user selects a suggestion */
|
|
33
|
+
onSuggestionSelect?: (suggestion: SuggestionItem) => void;
|
|
34
|
+
/** Callback when user clicks a product */
|
|
35
|
+
onProductClick?: (product: ProductItem) => void;
|
|
36
|
+
}
|
|
37
|
+
export declare function SuggestionsProvider({ children, minQueryLength, debounceMs, maxSuggestions, includeDropdownRecommendations, filteredTabs, enableAnalytics, analyticsTags, onSearch, onSuggestionSelect, onProductClick, }: SuggestionsProviderProps): React.JSX.Element;
|
|
38
|
+
//# sourceMappingURL=SuggestionsProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SuggestionsProvider.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/SuggestionsProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAMN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAA6C,MAAM,0BAA0B,CAAC;AAGvH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,2BAA2B;IAC3B,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,4BAA4B;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB;IACrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1D,0CAA0C;IAC1C,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CACjD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,cAAkB,EAClB,UAAgB,EAChB,cAAmB,EACnB,8BAAqC,EACrC,YAAY,EACZ,eAAsB,EACtB,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,cAAc,GACf,EAAE,wBAAwB,qBAoR1B"}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SuggestionsProvider
|
|
3
|
+
*
|
|
4
|
+
* Provides suggestions state (query, suggestions, products, recent, trending, tabs),
|
|
5
|
+
* actions (selectSuggestion, selectProduct, submitSearch, etc.), and keyboard navigation.
|
|
6
|
+
* Uses useQuerySuggestionsEnhanced and useSuggestionsAnalytics; must be inside SearchProvider.
|
|
7
|
+
*/
|
|
8
|
+
import React, { useState, useCallback, useMemo, useEffect, useRef, } from 'react';
|
|
9
|
+
import { useSearchContext } from '../SearchProvider';
|
|
10
|
+
import { useQuerySuggestionsEnhanced } from '../../hooks/useQuerySuggestionsEnhanced';
|
|
11
|
+
import { useSuggestionsAnalytics } from '../../hooks/useSuggestionsAnalytics';
|
|
12
|
+
import { SuggestionsContext } from './SuggestionsContext';
|
|
13
|
+
export function SuggestionsProvider({ children, minQueryLength = 1, debounceMs = 200, maxSuggestions = 10, includeDropdownRecommendations = true, filteredTabs, enableAnalytics = true, analyticsTags, onSearch, onSuggestionSelect, onProductClick, }) {
|
|
14
|
+
const { client } = useSearchContext();
|
|
15
|
+
const [query, setQueryState] = useState('');
|
|
16
|
+
const [isOpen, setIsOpenState] = useState(false);
|
|
17
|
+
const [activeIndex, setActiveIndex] = useState(-1);
|
|
18
|
+
const [activeTabId, setActiveTabId] = useState('');
|
|
19
|
+
const [prefetchedProducts, setPrefetchedProducts] = useState([]);
|
|
20
|
+
// Prefetch product results on mount so they're available instantly when dropdown opens
|
|
21
|
+
const prefetchedProductsRef = useRef(false);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (prefetchedProductsRef.current || !client?.search)
|
|
24
|
+
return;
|
|
25
|
+
prefetchedProductsRef.current = true;
|
|
26
|
+
client.search('*', { per_page: 12, page: 1 })
|
|
27
|
+
.then((res) => {
|
|
28
|
+
const data = res?.data;
|
|
29
|
+
const items = data?.results || data?.data || res?.results || res?.hits || [];
|
|
30
|
+
if (Array.isArray(items) && items.length > 0) {
|
|
31
|
+
setPrefetchedProducts(items);
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
.catch(() => { });
|
|
35
|
+
}, [client]);
|
|
36
|
+
const suggestionsData = useQuerySuggestionsEnhanced({
|
|
37
|
+
client,
|
|
38
|
+
query,
|
|
39
|
+
enabled: isOpen,
|
|
40
|
+
prefetch: minQueryLength === 0,
|
|
41
|
+
minQueryLength,
|
|
42
|
+
debounceMs,
|
|
43
|
+
maxSuggestions,
|
|
44
|
+
includeDropdownRecommendations,
|
|
45
|
+
filteredTabs,
|
|
46
|
+
includeCategories: true,
|
|
47
|
+
enableRecentSearches: true,
|
|
48
|
+
maxRecentSearches: 8,
|
|
49
|
+
analyticsTags,
|
|
50
|
+
});
|
|
51
|
+
const analytics = useSuggestionsAnalytics({
|
|
52
|
+
client,
|
|
53
|
+
enabled: enableAnalytics,
|
|
54
|
+
analyticsTags,
|
|
55
|
+
trackClicks: true,
|
|
56
|
+
trackImpressions: true,
|
|
57
|
+
});
|
|
58
|
+
const { suggestions, recentSearches, trendingSearches, trendingProducts, filteredTabs: filteredTabsData, loading, error, hasContent, getAllNavigableItems, addRecentSearch, clearRecentSearches, } = suggestionsData;
|
|
59
|
+
// Wrap getAllNavigableItems to include prefetchedProducts when trendingProducts is empty
|
|
60
|
+
const getAllNavigableItemsWithPrefetched = useCallback(() => {
|
|
61
|
+
const items = getAllNavigableItems();
|
|
62
|
+
// If there are already product items in the list, return as-is
|
|
63
|
+
if (items.some(i => i.type === 'product'))
|
|
64
|
+
return items;
|
|
65
|
+
// Otherwise append prefetchedProducts as navigable product items
|
|
66
|
+
if (prefetchedProducts.length > 0) {
|
|
67
|
+
let idx = items.length;
|
|
68
|
+
prefetchedProducts.forEach(product => {
|
|
69
|
+
items.push({ type: 'product', index: idx++, data: product });
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return items;
|
|
73
|
+
}, [getAllNavigableItems, prefetchedProducts]);
|
|
74
|
+
const onSearchRef = useRef(onSearch);
|
|
75
|
+
const onSuggestionSelectRef = useRef(onSuggestionSelect);
|
|
76
|
+
const onProductClickRef = useRef(onProductClick);
|
|
77
|
+
onSearchRef.current = onSearch;
|
|
78
|
+
onSuggestionSelectRef.current = onSuggestionSelect;
|
|
79
|
+
onProductClickRef.current = onProductClick;
|
|
80
|
+
const setQuery = useCallback((q) => {
|
|
81
|
+
setQueryState(q);
|
|
82
|
+
setActiveIndex(-1);
|
|
83
|
+
}, []);
|
|
84
|
+
const close = useCallback(() => {
|
|
85
|
+
analytics.trackDropdownClose(query);
|
|
86
|
+
setIsOpenState(false);
|
|
87
|
+
setActiveIndex(-1);
|
|
88
|
+
}, [analytics, query]);
|
|
89
|
+
const setIsOpen = useCallback((open) => {
|
|
90
|
+
if (open) {
|
|
91
|
+
setIsOpenState(true);
|
|
92
|
+
analytics.trackDropdownOpen(query);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
close();
|
|
96
|
+
}
|
|
97
|
+
}, [analytics, query, close]);
|
|
98
|
+
const selectSuggestion = useCallback((suggestion, position) => {
|
|
99
|
+
analytics.trackSuggestionClick({
|
|
100
|
+
suggestion,
|
|
101
|
+
position,
|
|
102
|
+
query,
|
|
103
|
+
totalSuggestions: suggestions.length,
|
|
104
|
+
});
|
|
105
|
+
setQuery(suggestion.query);
|
|
106
|
+
onSuggestionSelectRef.current?.(suggestion);
|
|
107
|
+
analytics.trackSearchSubmit(suggestion.query, true, suggestion);
|
|
108
|
+
addRecentSearch(suggestion.query);
|
|
109
|
+
close();
|
|
110
|
+
onSearchRef.current?.(suggestion.query);
|
|
111
|
+
}, [analytics, query, suggestions.length, addRecentSearch, close]);
|
|
112
|
+
const selectProduct = useCallback((product, position, section, tabId) => {
|
|
113
|
+
analytics.trackProductClick({
|
|
114
|
+
product,
|
|
115
|
+
position,
|
|
116
|
+
section: section ?? 'products',
|
|
117
|
+
tabId,
|
|
118
|
+
query,
|
|
119
|
+
});
|
|
120
|
+
close();
|
|
121
|
+
onProductClickRef.current?.(product);
|
|
122
|
+
}, [analytics, query, close]);
|
|
123
|
+
const selectRecentSearch = useCallback((search) => {
|
|
124
|
+
analytics.trackRecentSearchClick(search);
|
|
125
|
+
setQuery(search.query);
|
|
126
|
+
close();
|
|
127
|
+
onSearchRef.current?.(search.query);
|
|
128
|
+
analytics.trackSearchSubmit(search.query, false);
|
|
129
|
+
}, [analytics, close]);
|
|
130
|
+
const selectTrendingSearch = useCallback((trending, position) => {
|
|
131
|
+
analytics.trackTrendingClick(trending, position);
|
|
132
|
+
setQuery(trending.query);
|
|
133
|
+
close();
|
|
134
|
+
onSearchRef.current?.(trending.query);
|
|
135
|
+
analytics.trackSearchSubmit(trending.query, false);
|
|
136
|
+
}, [analytics, close]);
|
|
137
|
+
const setActiveTab = useCallback((tab) => {
|
|
138
|
+
setActiveTabId(tab.id);
|
|
139
|
+
analytics.trackTabSelect(tab, query);
|
|
140
|
+
}, [analytics, query]);
|
|
141
|
+
const submitSearch = useCallback((q, fromSuggestion, suggestion) => {
|
|
142
|
+
const trimmed = q.trim();
|
|
143
|
+
if (!trimmed)
|
|
144
|
+
return;
|
|
145
|
+
analytics.trackSearchSubmit(trimmed, !!fromSuggestion, suggestion);
|
|
146
|
+
addRecentSearch(trimmed);
|
|
147
|
+
close();
|
|
148
|
+
onSearchRef.current?.(trimmed);
|
|
149
|
+
}, [analytics, addRecentSearch, close]);
|
|
150
|
+
const navigateNext = useCallback(() => {
|
|
151
|
+
const items = getAllNavigableItemsWithPrefetched();
|
|
152
|
+
if (items.length === 0)
|
|
153
|
+
return;
|
|
154
|
+
setActiveIndex((i) => (i < items.length - 1 ? i + 1 : 0));
|
|
155
|
+
}, [getAllNavigableItemsWithPrefetched]);
|
|
156
|
+
const navigatePrev = useCallback(() => {
|
|
157
|
+
const items = getAllNavigableItemsWithPrefetched();
|
|
158
|
+
if (items.length === 0)
|
|
159
|
+
return;
|
|
160
|
+
setActiveIndex((i) => (i <= 0 ? items.length - 1 : i - 1));
|
|
161
|
+
}, [getAllNavigableItemsWithPrefetched]);
|
|
162
|
+
const selectActive = useCallback(() => {
|
|
163
|
+
const items = getAllNavigableItemsWithPrefetched();
|
|
164
|
+
if (activeIndex < 0 || activeIndex >= items.length) {
|
|
165
|
+
submitSearch(query);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const item = items[activeIndex];
|
|
169
|
+
switch (item.type) {
|
|
170
|
+
case 'suggestion':
|
|
171
|
+
selectSuggestion(item.data, item.index);
|
|
172
|
+
break;
|
|
173
|
+
case 'product':
|
|
174
|
+
selectProduct(item.data, item.index, 'products');
|
|
175
|
+
break;
|
|
176
|
+
case 'recent':
|
|
177
|
+
selectRecentSearch(item.data);
|
|
178
|
+
break;
|
|
179
|
+
case 'trending':
|
|
180
|
+
selectTrendingSearch(item.data, item.index);
|
|
181
|
+
break;
|
|
182
|
+
default:
|
|
183
|
+
submitSearch(query);
|
|
184
|
+
}
|
|
185
|
+
}, [activeIndex, getAllNavigableItemsWithPrefetched, query, submitSearch, selectSuggestion, selectProduct, selectRecentSearch, selectTrendingSearch]);
|
|
186
|
+
// Impression when open and content changes
|
|
187
|
+
useEffect(() => {
|
|
188
|
+
if (!isOpen || !hasContent || !query)
|
|
189
|
+
return;
|
|
190
|
+
analytics.trackImpression({
|
|
191
|
+
suggestions,
|
|
192
|
+
products: trendingProducts,
|
|
193
|
+
query,
|
|
194
|
+
timestamp: Date.now(),
|
|
195
|
+
});
|
|
196
|
+
}, [isOpen, hasContent, query, suggestions, trendingProducts, analytics]);
|
|
197
|
+
const value = useMemo(() => ({
|
|
198
|
+
query,
|
|
199
|
+
setQuery,
|
|
200
|
+
isOpen,
|
|
201
|
+
setIsOpen,
|
|
202
|
+
activeIndex,
|
|
203
|
+
setActiveIndex,
|
|
204
|
+
suggestions,
|
|
205
|
+
recentSearches,
|
|
206
|
+
trendingSearches,
|
|
207
|
+
trendingProducts,
|
|
208
|
+
prefetchedProducts,
|
|
209
|
+
filteredTabs: filteredTabsData,
|
|
210
|
+
activeTabId,
|
|
211
|
+
setActiveTabId,
|
|
212
|
+
loading,
|
|
213
|
+
error,
|
|
214
|
+
hasContent,
|
|
215
|
+
getAllNavigableItems: getAllNavigableItemsWithPrefetched,
|
|
216
|
+
selectSuggestion,
|
|
217
|
+
selectProduct,
|
|
218
|
+
selectRecentSearch,
|
|
219
|
+
selectTrendingSearch,
|
|
220
|
+
setActiveTab,
|
|
221
|
+
submitSearch,
|
|
222
|
+
clearRecentSearches,
|
|
223
|
+
close,
|
|
224
|
+
navigateNext,
|
|
225
|
+
navigatePrev,
|
|
226
|
+
selectActive,
|
|
227
|
+
}), [
|
|
228
|
+
query,
|
|
229
|
+
setQuery,
|
|
230
|
+
isOpen,
|
|
231
|
+
setIsOpen,
|
|
232
|
+
activeIndex,
|
|
233
|
+
setActiveIndex,
|
|
234
|
+
suggestions,
|
|
235
|
+
recentSearches,
|
|
236
|
+
trendingSearches,
|
|
237
|
+
trendingProducts,
|
|
238
|
+
prefetchedProducts,
|
|
239
|
+
filteredTabsData,
|
|
240
|
+
activeTabId,
|
|
241
|
+
setActiveTabId,
|
|
242
|
+
loading,
|
|
243
|
+
error,
|
|
244
|
+
hasContent,
|
|
245
|
+
getAllNavigableItemsWithPrefetched,
|
|
246
|
+
selectSuggestion,
|
|
247
|
+
selectProduct,
|
|
248
|
+
selectRecentSearch,
|
|
249
|
+
selectTrendingSearch,
|
|
250
|
+
setActiveTab,
|
|
251
|
+
submitSearch,
|
|
252
|
+
clearRecentSearches,
|
|
253
|
+
close,
|
|
254
|
+
navigateNext,
|
|
255
|
+
navigatePrev,
|
|
256
|
+
selectActive,
|
|
257
|
+
]);
|
|
258
|
+
return (React.createElement(SuggestionsContext.Provider, { value: value }, children));
|
|
259
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TrendingList – list of trending searches (primitive)
|
|
3
|
+
*
|
|
4
|
+
* Reads trendingSearches from context; each click calls selectTrendingSearch. Optional title/render.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { TrendingSearch } from '@seekora-ai/ui-sdk-types';
|
|
8
|
+
export interface TrendingListProps {
|
|
9
|
+
title?: string;
|
|
10
|
+
maxItems?: number;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
listClassName?: string;
|
|
14
|
+
renderItem?: (trending: TrendingSearch, index: number, onSelect: () => void) => React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function TrendingList({ title, maxItems, className, style, listClassName, renderItem, }: TrendingListProps): React.JSX.Element | null;
|
|
17
|
+
//# sourceMappingURL=TrendingList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrendingList.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/TrendingList.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;CACjG;AA2CD,wBAAgB,YAAY,CAAC,EAC3B,KAAkB,EAClB,QAAY,EACZ,SAAS,EACT,KAAK,EACL,aAAa,EACb,UAAU,GACX,EAAE,iBAAiB,4BAiCnB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TrendingList – list of trending searches (primitive)
|
|
3
|
+
*
|
|
4
|
+
* Reads trendingSearches from context; each click calls selectTrendingSearch. Optional title/render.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { useSuggestionsContext } from './SuggestionsContext';
|
|
8
|
+
import { clsx } from 'clsx';
|
|
9
|
+
const itemStyle = {
|
|
10
|
+
padding: '10px 12px',
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
border: 'none',
|
|
13
|
+
width: '100%',
|
|
14
|
+
textAlign: 'left',
|
|
15
|
+
fontSize: 'inherit',
|
|
16
|
+
fontFamily: 'inherit',
|
|
17
|
+
backgroundColor: 'transparent',
|
|
18
|
+
color: 'inherit',
|
|
19
|
+
transition: 'background-color 120ms ease',
|
|
20
|
+
};
|
|
21
|
+
function TrendingItem({ trending, onSelect }) {
|
|
22
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
23
|
+
return (React.createElement("li", null,
|
|
24
|
+
React.createElement("button", { type: "button", className: clsx('seekora-suggestions-trending-item', isHovered && 'seekora-suggestions-trending-item--hover'), style: {
|
|
25
|
+
...itemStyle,
|
|
26
|
+
...(isHovered ? { backgroundColor: 'var(--seekora-bg-hover, rgba(0,0,0,0.05))' } : {}),
|
|
27
|
+
}, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onMouseDown: (e) => {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
onSelect();
|
|
30
|
+
} },
|
|
31
|
+
trending.query,
|
|
32
|
+
trending.count != null ? (React.createElement("span", { style: { marginLeft: 8, color: 'inherit', opacity: 0.6, fontSize: '0.875em' } }, trending.count)) : null)));
|
|
33
|
+
}
|
|
34
|
+
export function TrendingList({ title = 'Trending', maxItems = 8, className, style, listClassName, renderItem, }) {
|
|
35
|
+
const { trendingSearches, selectTrendingSearch } = useSuggestionsContext();
|
|
36
|
+
const items = trendingSearches.slice(0, maxItems);
|
|
37
|
+
if (items.length === 0)
|
|
38
|
+
return null;
|
|
39
|
+
return (React.createElement("div", { className: clsx('seekora-suggestions-trending-list', className), style: style },
|
|
40
|
+
title ? (React.createElement("div", { className: "seekora-suggestions-trending-title", style: { padding: '8px 12px', fontSize: '0.75rem', fontWeight: 600, color: 'inherit', opacity: 0.6, textTransform: 'uppercase' } }, title)) : null,
|
|
41
|
+
React.createElement("ul", { className: clsx('seekora-suggestions-trending-ul', listClassName), style: { margin: 0, padding: 0, listStyle: 'none' } }, items.map((trending, i) => {
|
|
42
|
+
const onSelect = () => selectTrendingSearch(trending, i);
|
|
43
|
+
if (renderItem) {
|
|
44
|
+
return React.createElement("li", { key: `${trending.query}-${i}` }, renderItem(trending, i, onSelect));
|
|
45
|
+
}
|
|
46
|
+
return (React.createElement(TrendingItem, { key: `${trending.query}-${i}`, trending: trending, onSelect: onSelect }));
|
|
47
|
+
}))));
|
|
48
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses suggestion text containing <mark>...</mark> and returns React nodes
|
|
3
|
+
* with the marked segments rendered as styled elements. Safe: inner content
|
|
4
|
+
* is rendered as text, not HTML.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
/** Visual highlight styles */
|
|
8
|
+
export type HighlightStyle = 'background' | 'underline' | 'bold' | 'color-only';
|
|
9
|
+
export interface HighlightMarkupOptions {
|
|
10
|
+
/** Class name for the highlight element. */
|
|
11
|
+
markClassName?: string;
|
|
12
|
+
/** Inline style for the highlight element (merged with computed styles). */
|
|
13
|
+
markStyle?: React.CSSProperties;
|
|
14
|
+
/** Override background color for highlighted segments */
|
|
15
|
+
highlightColor?: string;
|
|
16
|
+
/** Text color for highlighted segments */
|
|
17
|
+
highlightTextColor?: string;
|
|
18
|
+
/** Font weight for highlighted segments */
|
|
19
|
+
highlightFontWeight?: string | number;
|
|
20
|
+
/** Visual highlight style (default: 'background') */
|
|
21
|
+
highlightStyle?: HighlightStyle;
|
|
22
|
+
/** Which HTML element to render for highlights (default: 'mark') */
|
|
23
|
+
highlightTag?: keyof JSX.IntrinsicElements;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Converts a string like "lined <mark>blue</mark>" into React nodes with
|
|
27
|
+
* the marked part rendered as a styled element. When no <mark> tags are
|
|
28
|
+
* present, returns the string as-is.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseHighlightMarkup(text: string, options?: HighlightMarkupOptions): React.ReactNode;
|
|
31
|
+
//# sourceMappingURL=highlightMarkup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlightMarkup.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions-primitives/highlightMarkup.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,8BAA8B;AAC9B,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,YAAY,CAAC;AAEhF,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAChC,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2CAA2C;IAC3C,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,qDAAqD;IACrD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAC;CAC5C;AA4CD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,sBAA2B,GACnC,KAAK,CAAC,SAAS,CAkCjB"}
|