import type { CatalogStory } from '../../catalog/types.js';
/**
 * Normalizes the search text; an empty result means "no filter".
 * @param query Raw text typed by the user.
 */
export declare function searchNeedle(query: string | undefined): string;
/**
 * Whether a variant's ID or title contains the needle.
 * @param variant Variant metadata.
 * @param variant.id Variant ID.
 * @param variant.title Variant title.
 * @param needle Normalized search text.
 */
export declare function variantMatches(variant: {
    id: string;
    title: string;
}, needle: string): boolean;
/**
 * Whether the story itself (title, ID, file label) contains the needle.
 * @param story Story metadata.
 * @param needle Normalized search text.
 */
export declare function storyMatches(story: CatalogStory, needle: string): boolean;
/**
 * Story passes the filter through its own text or any variant text. Runs over the
 * complete canonical catalog, so matches beyond the loaded page are never omitted.
 * @param story Story metadata.
 * @param needle Normalized search text (non-empty).
 */
export declare function storyOrVariantMatches(story: CatalogStory, needle: string): boolean;
//# sourceMappingURL=search.d.ts.map