@seekora-ai/ui-sdk-react 0.2.9 → 0.2.10
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/suggestions-primitives/SuggestionItem.d.ts +15 -2
- package/dist/components/suggestions-primitives/SuggestionItem.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/SuggestionItem.js +11 -3
- package/dist/components/suggestions-primitives/SuggestionList.d.ts +13 -2
- package/dist/components/suggestions-primitives/SuggestionList.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/SuggestionList.js +5 -3
- package/dist/components/suggestions-primitives/highlightMarkup.d.ts +19 -0
- package/dist/components/suggestions-primitives/highlightMarkup.d.ts.map +1 -0
- package/dist/components/suggestions-primitives/highlightMarkup.js +32 -0
- package/dist/components/suggestions-primitives/index.d.ts +2 -0
- package/dist/components/suggestions-primitives/index.d.ts.map +1 -1
- package/dist/components/suggestions-primitives/index.js +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/src/index.d.ts +44 -5
- package/dist/src/index.esm.js +48 -7
- package/dist/src/index.esm.js.map +1 -1
- package/dist/src/index.js +48 -6
- package/dist/src/index.js.map +1 -1
- package/package.json +5 -5
package/dist/src/index.d.ts
CHANGED
|
@@ -1562,19 +1562,49 @@ interface DropdownPanelProps {
|
|
|
1562
1562
|
}
|
|
1563
1563
|
declare function DropdownPanel({ children, position, top, left, right, width, maxHeight, zIndex, className, style, closeOnClickOutside, closeOnEscape, }: DropdownPanelProps): React__default.JSX.Element | null;
|
|
1564
1564
|
|
|
1565
|
+
/**
|
|
1566
|
+
* Parses suggestion text containing <mark>...</mark> and returns React nodes
|
|
1567
|
+
* with the marked segments rendered as <mark> elements. Safe: inner content
|
|
1568
|
+
* is rendered as text, not HTML.
|
|
1569
|
+
*/
|
|
1570
|
+
|
|
1571
|
+
interface HighlightMarkupOptions {
|
|
1572
|
+
/** Class name for the <mark> element. */
|
|
1573
|
+
markClassName?: string;
|
|
1574
|
+
/** Inline style for the <mark> element. */
|
|
1575
|
+
markStyle?: React__default.CSSProperties;
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* Converts a string like "lined <mark>blue</mark>" into React nodes with
|
|
1579
|
+
* the marked part rendered as a <mark> element. When no <mark> tags are
|
|
1580
|
+
* present, returns the string as-is.
|
|
1581
|
+
*/
|
|
1582
|
+
declare function parseHighlightMarkup(text: string, options?: HighlightMarkupOptions): React__default.ReactNode;
|
|
1583
|
+
|
|
1565
1584
|
interface SuggestionListProps {
|
|
1566
1585
|
maxItems?: number;
|
|
1567
1586
|
className?: string;
|
|
1568
1587
|
style?: React__default.CSSProperties;
|
|
1569
1588
|
listClassName?: string;
|
|
1589
|
+
/**
|
|
1590
|
+
* When true (default), suggestion text with <mark>...</mark> is rendered
|
|
1591
|
+
* with those segments highlighted. When false, plain text is shown.
|
|
1592
|
+
* Only applies when not using custom renderItem.
|
|
1593
|
+
*/
|
|
1594
|
+
enableHighlightMarkup?: boolean;
|
|
1595
|
+
/** Options for default highlight <mark> styling. Only applies when not using custom renderItem. */
|
|
1596
|
+
highlightMarkupOptions?: HighlightMarkupOptions;
|
|
1570
1597
|
renderItem?: (suggestion: _seekora_ai_ui_sdk_types.SuggestionItem, index: number, isActive: boolean, onSelect: () => void) => React__default.ReactNode;
|
|
1571
1598
|
}
|
|
1572
|
-
declare function SuggestionList({ maxItems, className, style, listClassName, renderItem, }: SuggestionListProps): React__default.JSX.Element | null;
|
|
1599
|
+
declare function SuggestionList({ maxItems, className, style, listClassName, enableHighlightMarkup, highlightMarkupOptions, renderItem, }: SuggestionListProps): React__default.JSX.Element | null;
|
|
1573
1600
|
|
|
1574
1601
|
/**
|
|
1575
1602
|
* SuggestionItem – single text suggestion row (primitive)
|
|
1576
1603
|
*
|
|
1577
|
-
* Highlights when isActive; onClick calls context selectSuggestion.
|
|
1604
|
+
* Highlights when isActive; onClick calls context selectSuggestion.
|
|
1605
|
+
* When enableHighlightMarkup is true (default), parses <mark>...</mark> in
|
|
1606
|
+
* suggestion text and renders as highlighted <mark> elements. Overridable via
|
|
1607
|
+
* renderHighlight, className/style.
|
|
1578
1608
|
*/
|
|
1579
1609
|
|
|
1580
1610
|
interface SuggestionItemProps {
|
|
@@ -1584,9 +1614,18 @@ interface SuggestionItemProps {
|
|
|
1584
1614
|
onSelect: () => void;
|
|
1585
1615
|
className?: string;
|
|
1586
1616
|
style?: React__default.CSSProperties;
|
|
1617
|
+
/**
|
|
1618
|
+
* When true (default), text containing <mark>...</mark> is rendered with
|
|
1619
|
+
* those segments as highlighted <mark> elements. When false, plain query
|
|
1620
|
+
* text is shown with no markup parsing.
|
|
1621
|
+
*/
|
|
1622
|
+
enableHighlightMarkup?: boolean;
|
|
1623
|
+
/** Options for the default highlight <mark> styling when enableHighlightMarkup is true. */
|
|
1624
|
+
highlightMarkupOptions?: HighlightMarkupOptions;
|
|
1625
|
+
/** Custom renderer for suggestion text; overrides default highlight parsing when provided. */
|
|
1587
1626
|
renderHighlight?: (text: string) => React__default.ReactNode;
|
|
1588
1627
|
}
|
|
1589
|
-
declare function SuggestionItem$1({ suggestion, index, isActive, onSelect, className, style, renderHighlight, }: SuggestionItemProps): React__default.JSX.Element;
|
|
1628
|
+
declare function SuggestionItem$1({ suggestion, index, isActive, onSelect, className, style, enableHighlightMarkup, highlightMarkupOptions, renderHighlight, }: SuggestionItemProps): React__default.JSX.Element;
|
|
1590
1629
|
|
|
1591
1630
|
/**
|
|
1592
1631
|
* ItemCard – generic item tile (primitive)
|
|
@@ -3621,5 +3660,5 @@ declare function updateSuggestionsStyles(theme: SuggestionsThemeVariables): void
|
|
|
3621
3660
|
|
|
3622
3661
|
declare const createTheme: (config: ThemeConfig) => _seekora_ai_ui_sdk_types.Theme;
|
|
3623
3662
|
|
|
3624
|
-
export { AmazonDropdown, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight, HitsPerPage, ImageDisplay, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem$1 as SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsCache, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBrand, extractCategory, extractProduct, extractSuggestion, formatParsedFilters, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, minimalTheme, minimalThemeVariables, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext };
|
|
3625
|
-
export type { AnalyticsConfig, AnalyticsEventPayload, BaseDropdownProps, BrandFieldMapping, BreadcrumbItem, BreadcrumbProps, BreadcrumbTheme, CategoriesTabsProps, CategoryFieldMapping, ClearRefinementsProps, ClearRefinementsTheme, DocSearchAction, DocSearchButtonProps, DocSearchHit, DocSearchProps, DocSearchResponse, DocSearchState, DocSearchSuggestion, DocSearchSuggestionsResponse, DocSearchTranslations, DropdownClassNames, DropdownEventHandlers, DropdownPanelProps, DropdownRef, DropdownThemeConfig, FederatedDropdownProps, FederatedDropdownRef, FrequentlyBoughtTogetherProps, GenericItem, HierarchicalMenuItem, HierarchicalMenuProps, HierarchicalMenuTheme, HighlightProps, HighlightTheme, HitsPerPageItem, HitsPerPageProps, HitsPerPageTheme, ImageDisplayProps, ImageDisplayVariant, InfiniteHitsProps, InfiniteHitsTheme, ImageDisplayVariant$1 as ItemCardImageVariant, ItemCardProps, ItemGridProps, MobileFiltersButtonProps, MobileFiltersProps, MobileFiltersTheme, NaturalLanguageFiltersOptions, NaturalLanguageResult, NavigableItem, ParsedFilter, ProductCardImageVariant, ProductCardProps, ProductClickEventData, ProductDisplayConfig, ProductFieldMapping, ProductGalleryProps, ProductGridProps, ProductInfoProps, ProductRecommendationsProps, QuerySuggestionsDropdownProps, QuerySuggestionsDropdownRef, QuerySuggestionsProps, QuerySuggestionsTheme, RangeSliderProps, RangeSliderTheme, RecentSearchesListProps, RecentlyViewedProps, RecommendationItem, RecommendationTheme, RefinementInput, RelatedProductsProps, ResponsiveState, RichQuerySuggestionsProps, RichQuerySuggestionsRef, SearchBarProps, SearchBarTheme, SearchBarWithSuggestionsProps, SearchBarWithSuggestionsRef, SearchInputProps, SearchProviderProps, SearchResultsProps, SearchResultsTheme, SearchSource, SectionConfig, SectionErrorProps, SectionItemGridProps, SectionLoadingProps, SectionSearchContextValue, SectionSearchProviderProps, SmartSuggestion, SmartSuggestionsOptions, SnippetProps, SnippetTheme, SuggestionClickEventData, SuggestionDisplayConfig, SuggestionDropdownVariant, SuggestionFieldMapping, SuggestionImpressionEventData, SuggestionItemProps, SuggestionListProps, SuggestionSearchBarProps, SuggestionSearchBarRef, SuggestionsContextValue, SuggestionsDropdownCompositionProps, SuggestionsErrorProps, SuggestionsLoadingProps, SuggestionsProviderProps, SuggestionsThemeVariables, TrendingItemsProps, TrendingListProps, UseAnalyticsOptions, UseAnalyticsReturn, UseSeekoraSearchOptions$1 as UseDocSearchSeekoraSearchOptions, UseSeekoraSearchResult as UseDocSearchSeekoraSearchResult, UseQuerySuggestionsEnhancedOptions, UseQuerySuggestionsEnhancedReturn, UseSmartSuggestionsReturn, UseSuggestionsAnalyticsOptions, UseSuggestionsAnalyticsReturn };
|
|
3663
|
+
export { AmazonDropdown, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight, HitsPerPage, ImageDisplay, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem$1 as SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsCache, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBrand, extractCategory, extractProduct, extractSuggestion, formatParsedFilters, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, minimalTheme, minimalThemeVariables, parseHighlightMarkup, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext };
|
|
3664
|
+
export type { AnalyticsConfig, AnalyticsEventPayload, BaseDropdownProps, BrandFieldMapping, BreadcrumbItem, BreadcrumbProps, BreadcrumbTheme, CategoriesTabsProps, CategoryFieldMapping, ClearRefinementsProps, ClearRefinementsTheme, DocSearchAction, DocSearchButtonProps, DocSearchHit, DocSearchProps, DocSearchResponse, DocSearchState, DocSearchSuggestion, DocSearchSuggestionsResponse, DocSearchTranslations, DropdownClassNames, DropdownEventHandlers, DropdownPanelProps, DropdownRef, DropdownThemeConfig, FederatedDropdownProps, FederatedDropdownRef, FrequentlyBoughtTogetherProps, GenericItem, HierarchicalMenuItem, HierarchicalMenuProps, HierarchicalMenuTheme, HighlightMarkupOptions, HighlightProps, HighlightTheme, HitsPerPageItem, HitsPerPageProps, HitsPerPageTheme, ImageDisplayProps, ImageDisplayVariant, InfiniteHitsProps, InfiniteHitsTheme, ImageDisplayVariant$1 as ItemCardImageVariant, ItemCardProps, ItemGridProps, MobileFiltersButtonProps, MobileFiltersProps, MobileFiltersTheme, NaturalLanguageFiltersOptions, NaturalLanguageResult, NavigableItem, ParsedFilter, ProductCardImageVariant, ProductCardProps, ProductClickEventData, ProductDisplayConfig, ProductFieldMapping, ProductGalleryProps, ProductGridProps, ProductInfoProps, ProductRecommendationsProps, QuerySuggestionsDropdownProps, QuerySuggestionsDropdownRef, QuerySuggestionsProps, QuerySuggestionsTheme, RangeSliderProps, RangeSliderTheme, RecentSearchesListProps, RecentlyViewedProps, RecommendationItem, RecommendationTheme, RefinementInput, RelatedProductsProps, ResponsiveState, RichQuerySuggestionsProps, RichQuerySuggestionsRef, SearchBarProps, SearchBarTheme, SearchBarWithSuggestionsProps, SearchBarWithSuggestionsRef, SearchInputProps, SearchProviderProps, SearchResultsProps, SearchResultsTheme, SearchSource, SectionConfig, SectionErrorProps, SectionItemGridProps, SectionLoadingProps, SectionSearchContextValue, SectionSearchProviderProps, SmartSuggestion, SmartSuggestionsOptions, SnippetProps, SnippetTheme, SuggestionClickEventData, SuggestionDisplayConfig, SuggestionDropdownVariant, SuggestionFieldMapping, SuggestionImpressionEventData, SuggestionItemProps, SuggestionListProps, SuggestionSearchBarProps, SuggestionSearchBarRef, SuggestionsContextValue, SuggestionsDropdownCompositionProps, SuggestionsErrorProps, SuggestionsLoadingProps, SuggestionsProviderProps, SuggestionsThemeVariables, TrendingItemsProps, TrendingListProps, UseAnalyticsOptions, UseAnalyticsReturn, UseSeekoraSearchOptions$1 as UseDocSearchSeekoraSearchOptions, UseSeekoraSearchResult as UseDocSearchSeekoraSearchResult, UseQuerySuggestionsEnhancedOptions, UseQuerySuggestionsEnhancedReturn, UseSmartSuggestionsReturn, UseSuggestionsAnalyticsOptions, UseSuggestionsAnalyticsReturn };
|
package/dist/src/index.esm.js
CHANGED
|
@@ -7111,10 +7111,45 @@ function DropdownPanel({ children, position = 'absolute', top = '100%', left = 0
|
|
|
7111
7111
|
return (React.createElement("div", { ref: panelRef, role: "listbox", className: clsx('seekora-suggestions-dropdown-panel', className), style: { ...panelStyle, ...style } }, children));
|
|
7112
7112
|
}
|
|
7113
7113
|
|
|
7114
|
+
/**
|
|
7115
|
+
* Parses suggestion text containing <mark>...</mark> and returns React nodes
|
|
7116
|
+
* with the marked segments rendered as <mark> elements. Safe: inner content
|
|
7117
|
+
* is rendered as text, not HTML.
|
|
7118
|
+
*/
|
|
7119
|
+
const defaultMarkStyle = {
|
|
7120
|
+
backgroundColor: 'var(--seekora-highlight-bg, rgba(251, 191, 36, 0.4))',
|
|
7121
|
+
fontWeight: 500,
|
|
7122
|
+
borderRadius: '2px',
|
|
7123
|
+
padding: '0 2px',
|
|
7124
|
+
};
|
|
7125
|
+
/**
|
|
7126
|
+
* Converts a string like "lined <mark>blue</mark>" into React nodes with
|
|
7127
|
+
* the marked part rendered as a <mark> element. When no <mark> tags are
|
|
7128
|
+
* present, returns the string as-is.
|
|
7129
|
+
*/
|
|
7130
|
+
function parseHighlightMarkup(text, options = {}) {
|
|
7131
|
+
if (text == null || typeof text !== 'string')
|
|
7132
|
+
return text;
|
|
7133
|
+
const parts = text.split(/(<mark>[\s\S]*?<\/mark>)/g);
|
|
7134
|
+
if (parts.length <= 1)
|
|
7135
|
+
return text;
|
|
7136
|
+
const { markClassName, markStyle } = options;
|
|
7137
|
+
return (React.createElement(React.Fragment, null, parts.map((part, i) => {
|
|
7138
|
+
const m = part.match(/^<mark>([\s\S]*)<\/mark>$/);
|
|
7139
|
+
if (m) {
|
|
7140
|
+
return (React.createElement("mark", { key: i, className: markClassName, style: { ...defaultMarkStyle, ...markStyle } }, m[1]));
|
|
7141
|
+
}
|
|
7142
|
+
return part;
|
|
7143
|
+
})));
|
|
7144
|
+
}
|
|
7145
|
+
|
|
7114
7146
|
/**
|
|
7115
7147
|
* SuggestionItem – single text suggestion row (primitive)
|
|
7116
7148
|
*
|
|
7117
|
-
* Highlights when isActive; onClick calls context selectSuggestion.
|
|
7149
|
+
* Highlights when isActive; onClick calls context selectSuggestion.
|
|
7150
|
+
* When enableHighlightMarkup is true (default), parses <mark>...</mark> in
|
|
7151
|
+
* suggestion text and renders as highlighted <mark> elements. Overridable via
|
|
7152
|
+
* renderHighlight, className/style.
|
|
7118
7153
|
*/
|
|
7119
7154
|
const defaultItemStyle = {
|
|
7120
7155
|
padding: '10px 12px',
|
|
@@ -7129,9 +7164,13 @@ const defaultItemStyle = {
|
|
|
7129
7164
|
color: 'var(--seekora-text-primary, #111827)',
|
|
7130
7165
|
transition: 'background-color 120ms ease',
|
|
7131
7166
|
};
|
|
7132
|
-
function SuggestionItem({ suggestion, index, isActive, onSelect, className, style, renderHighlight, }) {
|
|
7167
|
+
function SuggestionItem({ suggestion, index, isActive, onSelect, className, style, enableHighlightMarkup = true, highlightMarkupOptions, renderHighlight, }) {
|
|
7133
7168
|
const displayText = suggestion.highlightedQuery ?? suggestion.query;
|
|
7134
|
-
const content = renderHighlight
|
|
7169
|
+
const content = renderHighlight != null
|
|
7170
|
+
? renderHighlight(displayText)
|
|
7171
|
+
: enableHighlightMarkup
|
|
7172
|
+
? parseHighlightMarkup(displayText ?? '', highlightMarkupOptions)
|
|
7173
|
+
: (suggestion.query ?? displayText ?? '');
|
|
7135
7174
|
return (React.createElement("li", { role: "option", "aria-selected": isActive, id: `seekora-suggestion-${index}`, className: clsx('seekora-suggestions-item', isActive && 'seekora-suggestions-item--active', className), style: {
|
|
7136
7175
|
...defaultItemStyle,
|
|
7137
7176
|
...(isActive ? { backgroundColor: 'var(--seekora-bg-hover, #f3f4f6)' } : {}),
|
|
@@ -7162,13 +7201,15 @@ function SuggestionsLoading({ className, style, text = 'Loading...' }) {
|
|
|
7162
7201
|
/**
|
|
7163
7202
|
* SuggestionList – container for text suggestions (primitive)
|
|
7164
7203
|
*
|
|
7165
|
-
* Renders list of SuggestionItem from context; uses activeIndex for highlight.
|
|
7204
|
+
* Renders list of SuggestionItem from context; uses activeIndex for highlight.
|
|
7205
|
+
* Optional renderItem. When not using renderItem, enableHighlightMarkup and
|
|
7206
|
+
* highlightMarkupOptions control parsing of <mark>...</mark> in suggestion text.
|
|
7166
7207
|
*/
|
|
7167
7208
|
const listStyle = {
|
|
7168
7209
|
margin: 0,
|
|
7169
7210
|
padding: '4px 0',
|
|
7170
7211
|
};
|
|
7171
|
-
function SuggestionList({ maxItems = 10, className, style, listClassName, renderItem, }) {
|
|
7212
|
+
function SuggestionList({ maxItems = 10, className, style, listClassName, enableHighlightMarkup = true, highlightMarkupOptions, renderItem, }) {
|
|
7172
7213
|
const { suggestions, activeIndex, loading, selectSuggestion, getAllNavigableItems, } = useSuggestionsContext();
|
|
7173
7214
|
const items = suggestions.slice(0, maxItems);
|
|
7174
7215
|
const navigableItems = getAllNavigableItems();
|
|
@@ -7187,7 +7228,7 @@ function SuggestionList({ maxItems = 10, className, style, listClassName, render
|
|
|
7187
7228
|
if (renderItem) {
|
|
7188
7229
|
return (React.createElement("li", { key: suggestion.objectID ?? suggestion.query ?? i, role: "option" }, renderItem(suggestion, globalIndex, isActive, onSelect)));
|
|
7189
7230
|
}
|
|
7190
|
-
return (React.createElement(SuggestionItem, { key: suggestion.objectID ?? suggestion.query ?? i, suggestion: suggestion, index: globalIndex, isActive: isActive, onSelect: onSelect }));
|
|
7231
|
+
return (React.createElement(SuggestionItem, { key: suggestion.objectID ?? suggestion.query ?? i, suggestion: suggestion, index: globalIndex, isActive: isActive, onSelect: onSelect, enableHighlightMarkup: enableHighlightMarkup, highlightMarkupOptions: highlightMarkupOptions }));
|
|
7191
7232
|
}))));
|
|
7192
7233
|
}
|
|
7193
7234
|
|
|
@@ -14373,5 +14414,5 @@ function updateSuggestionsStyles(theme) {
|
|
|
14373
14414
|
injectSuggestionsStyles(theme, true);
|
|
14374
14415
|
}
|
|
14375
14416
|
|
|
14376
|
-
export { AmazonDropdown, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, Fingerprint, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight$1 as Highlight, HitsPerPage, ImageDisplay, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBrand, extractCategory, extractProduct, extractSuggestion, formatParsedFilters, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getFingerprint, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, mergeThemes, minimalTheme, minimalThemeVariables, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext };
|
|
14417
|
+
export { AmazonDropdown, Breadcrumb, CategoriesTabs, ClearRefinements, CurrentRefinements, DocSearch, DocSearchButton, DropdownPanel, Facets, FederatedDropdown, Fingerprint, FrequentlyBoughtTogether, GoogleDropdown, HierarchicalMenu, Highlight$1 as Highlight, HitsPerPage, ImageDisplay, InfiniteHits, ItemCard, ItemGrid, MinimalDropdown, MobileFilters, MobileFiltersButton, MobileSheetDropdown, Pagination, PinterestDropdown, ProductCard, ProductGallery, ProductGrid, ProductInfo, ProductRecommendations, QuerySuggestions, QuerySuggestionsDropdown, RangeInput, RangeSlider, RecentSearchesList, RecentlyViewed, RelatedProducts, RichQuerySuggestions, SearchBar, SearchBarWithSuggestions, SearchInput, SearchLayout, SearchProvider, SearchResults, SectionError, SectionItemGrid, SectionLoading, SectionSearchProvider, ShopifyDropdown, Snippet, SortBy, SpotlightDropdown, Stats, SuggestionDropdownVariants, SuggestionItem, SuggestionList, SuggestionSearchBar, SuggestionsDropdownComposition, SuggestionsError, SuggestionsLoading, SuggestionsProvider, TrendingItems, TrendingList, addRecentSearch, addToRecentlyViewed, brandPresets, breakpoints, clearRecentSearches, clearSuggestionsCache, createSuggestionsCache, createSuggestionsTheme, createTheme, darkTheme, darkThemeVariables, defaultTheme, extractBrand, extractCategory, extractProduct, extractSuggestion, formatParsedFilters, formatPrice as formatSuggestionPrice, generateSuggestionsStylesheet, getFingerprint, getRecentSearches, getShortcutText, getSuggestionsCache, highlightText, injectGlobalResponsiveStyles, injectSuggestionsStyles, lightThemeVariables, mediaQueries, mergeThemes, minimalTheme, minimalThemeVariables, parseHighlightMarkup, removeRecentSearch, touchTargets, updateSuggestionsStyles, useAnalytics, useDocSearch, useSeekoraSearch$1 as useDocSearchSeekoraSearch, useInjectResponsiveStyles, useKeyboard, useNaturalLanguageFilters, useQuerySuggestions, useQuerySuggestionsEnhanced, useResponsive, useSearchContext, useSearchState, useSectionSearchContext, useSeekoraSearch, useSmartSuggestions, useSuggestionsAnalytics, useSuggestionsContext };
|
|
14377
14418
|
//# sourceMappingURL=index.esm.js.map
|