/** * Pure, DOM-free helpers that back the `BlogOverview` grid's search and category filtering. * Kept out of the client component so the (untestable-via-static-markup) interaction logic * can be unit-tested directly. Fuse.js runs in Node too, so these are plain function calls. */ import type { PostMeta } from "../../../blog/types.js"; /** * Fuzzily filters posts by a free-text query over their title, description, keywords, and * categories. An empty or whitespace-only query returns the posts unchanged (newest-first * order preserved); otherwise matches are returned in Fuse's relevance order. * * @param posts - the posts to search. * @param query - the reader's search text. * @returns the matching posts (all posts when the query is blank). */ export declare function searchPosts(posts: PostMeta[], query: string): PostMeta[]; /** * Filters posts to those tagged with the given category. A `null` category (the "all" state) * returns the posts unchanged. * * @param posts - the posts to filter. * @param category - the selected category, or `null` for all. * @returns the posts in the category (all posts when `category` is `null`). */ export declare function filterByCategory(posts: PostMeta[], category: string | null): PostMeta[];