import { ElementSelectorLogger } from '../types'; /** * Unstable-class pattern pack. * * The fallback walker filters classes through these regexes before adding them * to a selector. Classes that match are dropped — they don't participate in * sibling disambiguation and never appear in the emitted output. Defends * against three failure modes: * * 1. Build-tool / framework utilities (Tailwind, etc.) — class names that * look stable but change with every design tweak. * 2. CSS-in-JS / build-hash classes (Emotion, CSS modules, styled-components, * styled-jsx) — change on every build. * 3. Library runtime state classes (Swiper, MUI, Radix, Headless UI, * BEM-style is-active/is-open) — class is stable in name but its presence * on a given element moves as the user interacts. * * Defaults are surfaced to customers in remote config so they can audit what's * being filtered and add or remove patterns to match their stack. */ /** * Built-in defaults grouped by category for readability. The runtime treats * the whole list uniformly via `Array.prototype.some(pattern.test)`. */ export declare const DEFAULT_UNSTABLE_CLASS_PATTERNS: ReadonlyArray; /** * Compile a list of regex pattern strings (e.g. from a remote-config payload) * into RegExp objects. Invalid patterns are skipped (not thrown) so a single * bad regex in remote config can't crash the engine. * * Pass `logger` to surface invalid patterns at `warn` level — useful for * diagnosing why a customer's override isn't taking effect. * * Callers decide whether to merge the result with `DEFAULT_UNSTABLE_CLASS_PATTERNS` * or use it as a full replacement. That policy lives in the config resolver, * not here. */ export declare function compile(patterns: string[], logger?: ElementSelectorLogger): RegExp[]; /** * Filter a list of class names, dropping any that match a pattern. Returns a * new array containing only the survivors, preserving original order. * * Used by the fallback walker (in the next PR) before adding classes to a * selector for sibling disambiguation. Also returns sensibly on null / * undefined / empty inputs. */ export declare function filterClasses(classes: string[], patterns: ReadonlyArray): string[]; //# sourceMappingURL=unstable-classes.d.ts.map