igniteui-theming
Version:
A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.
19 lines (18 loc) • 795 B
TypeScript
import { ComponentMetadata } from './component-metadata.js';
/** Options accepted by {@link createComponentSearcher}. */
export interface CreateComponentSearcherOptions {
componentNames: string[];
metadata: Record<string, ComponentMetadata>;
}
/** Pre-built search index with a single `search` method. */
export interface ComponentSearcher {
search(query: string): string[];
}
/**
* Build a pre-indexed component searcher from theme names and metadata.
*
* The returned searcher normalises queries, scores them against an
* index of canonical names / aliases / selectors, and returns results
* ranked by confidence (exact > token-set > overlap > substring > typo).
*/
export declare function createComponentSearcher(options: CreateComponentSearcherOptions): ComponentSearcher;