import type { Base } from '../Base/index.js'; export interface QueryOptions { from?: HTMLElement | Document; } export type ParsedQuery = { name: string; cssSelector?: string; state?: string; }; /** * Parse a query string like 'Foo(.css-selector):mounted' into its parts. */ export declare const parseQuery: (query: string) => ParsedQuery; export declare function instanceIsMatching(instance: Base, parsedQuery: ParsedQuery): boolean; /** * Get the first instance of component with the given query. */ export declare function queryComponent(query: string, options?: QueryOptions): T | undefined; /** * Get all instances of component with the given query. */ export declare function queryComponentAll(query: string, options?: QueryOptions): T[]; /** * Get the closest component instance by traversing up the DOM tree. */ export declare function closestComponent(query: string, options?: { from: HTMLElement; }): T | undefined;