/** * The Timeline's element and regex filters, as pure functions. * * Both presentations (the list and the tracks) answer "show me only this * element" or "only things matching /update/". The filter state therefore * lives in `timeline-view` and each presentation applies it here, so the two * cannot drift apart on what a match means. */ import type { TimelineEvent } from '../../types/timeline.js'; import type { TimelineSpan } from './derive.js'; /** * Compiles the regex box. An empty box matches everything. A pattern that * does not compile (the user is mid-typing `foo(`) disables the filter rather * than hiding every row, and is reported as `invalid` so the input can say so. */ export declare const compileRegex: (source: string) => { re: RegExp | null; invalid: boolean; }; /** Text the regex filter searches: element tag, name, subtitle and the * changed property keys (the reason is worth searching for by name). */ export declare const spanHaystack: (span: TimelineSpan) => string; /** * Applies the element and regex filters. `re` comes from {@link compileRegex} * so a caller filtering on every keystroke compiles once, not per span. */ export declare const filterSpans: (spans: readonly TimelineSpan[], elementId: number | null, re: RegExp | null) => TimelineSpan[]; /** Distinct elements (by stable id) seen across the recorded events. */ export declare const listElements: (events: readonly TimelineEvent[]) => Array<{ id: number; tag: string; }>; //# sourceMappingURL=filter.d.ts.map