import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api'; import { SearchQuery, SearchResultSet, SearchResult as SearchResult$1, SearchDocument, ResultHighlight } from '@backstage/plugin-search-common'; import * as react_jsx_runtime from 'react/jsx-runtime'; import * as react from 'react'; import { PropsWithChildren, ReactNode, ReactElement, Dispatch, SetStateAction, DispatchWithoutAction } from 'react'; import { Extension } from '@backstage/core-plugin-api'; import { ListProps } from '@material-ui/core/List'; import { ListItemProps } from '@material-ui/core/ListItem'; import { TextFieldProps } from '@material-ui/core/TextField'; import { AutocompleteProps } from '@material-ui/lab/Autocomplete'; import { ListItemTextProps } from '@material-ui/core/ListItemText'; import { AsyncState } from 'react-use/esm/useAsync'; import { TypographyProps } from '@material-ui/core/Typography'; import { JsonValue, JsonObject } from '@backstage/types'; import { LinkProps } from '@backstage/core-components'; /** * @public */ declare const searchApiRef: _backstage_frontend_plugin_api.ApiRef; /** * @public */ interface SearchApi { query(query: SearchQuery, options?: { signal?: AbortSignal; }): Promise; } /** * @public * * Search Api Mock that can be used in tests and storybooks */ declare class MockSearchApi implements SearchApi { mockedResults?: SearchResultSet; constructor(mockedResults?: SearchResultSet); query(_query: SearchQuery, _options?: { signal?: AbortSignal; }): Promise; } /** * @public * Extends props for any search result list item extension */ type SearchResultListItemExtensionProps = Props & PropsWithChildren<{ rank?: number; result?: SearchDocument; noTrack?: boolean; } & Omit>; /** * @public * Options for {@link createSearchResultListItemExtension}. */ type SearchResultListItemExtensionOptions JSX.Element | null> = { /** * The extension name. */ name: string; /** * The extension component. */ component: () => Promise; /** * When an extension defines a predicate, it returns true if the result should be rendered by that extension. * Defaults to a predicate that returns true, which means it renders all sorts of results. */ predicate?: (result: SearchResult$1) => boolean; }; /** * @public * Creates a search result item extension. * @param options - The extension options, see {@link SearchResultListItemExtensionOptions} for more details. */ declare const createSearchResultListItemExtension: JSX.Element | null>(options: SearchResultListItemExtensionOptions) => Extension; /** * @public * Returns a function that renders a result using extensions. */ declare const useSearchResultListItemExtensions: (children: ReactNode) => (result: SearchResult$1, key?: number) => react_jsx_runtime.JSX.Element; /** * @public * Props for {@link SearchResultListItemExtensions} */ type SearchResultListItemExtensionsProps = Omit & { /** * Search result list. */ results: SearchResult$1[]; }; /** * @public * Render results using search extensions. * @param props - see {@link SearchResultListItemExtensionsProps} */ declare const SearchResultListItemExtensions: (props: SearchResultListItemExtensionsProps) => react_jsx_runtime.JSX.Element; /** @public */ type HighlightedSearchResultTextClassKey = 'highlight'; /** * Props for {@link HighlightedSearchResultText}. * * @public */ type HighlightedSearchResultTextProps = { text: string; preTag: string; postTag: string; }; /** * @public */ declare const HighlightedSearchResultText: (props: HighlightedSearchResultTextProps) => react_jsx_runtime.JSX.Element; /** * Props for {@link SearchBarBase}. * * @public */ type SearchBarBaseProps = Omit & { debounceTime?: number; clearButton?: boolean; onClear?: () => void; onSubmit?: () => void; onChange: (value: string) => void; endAdornment?: ReactNode; }; /** * All search boxes exported by the search plugin are based on the , * and this one is based on the component from Material UI. * Recommended if you don't use Search Provider or Search Context. * * @public */ declare const SearchBarBase: react.ForwardRefExoticComponent & react.RefAttributes>; /** * Props for {@link SearchBar}. * * @public */ type SearchBarProps = Partial; /** * Recommended search bar when you use the Search Provider or Search Context. * * @public */ declare const SearchBar: react.ForwardRefExoticComponent, "ref"> & react.RefAttributes>; /** * Props for {@link SearchAutocomplete}. * * @public */ type SearchAutocompleteProps