import { CSSNode, Selector } from "@projectwallace/css-parser"; //#region src/collection.d.ts type Location = { line: number; column: number; offset: number; length: number; }; type UniqueWithLocations = Record; type CollectionCount = { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (WithLocations extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); //#endregion //#region src/selectors/specificity.d.ts type Specificity = [number, number, number]; /** * @returns 0 if s1 equals s2, a negative number if s1 is lower than s2, or a positive number if s1 higher than s2 */ declare function compare(s1: Specificity, s2: Specificity): number; declare const calculateForAST: (selectorAST: Selector) => Specificity; declare const calculate: (selector: string | CSSNode) => Specificity[]; //#endregion //#region src/selectors/utils.d.ts declare function isPrefixed(selector: CSSNode, on_selector: (prefix: string) => void): void; /** * Check if a Wallace selector is an accessibility selector (has aria-* or role attribute) */ declare function isAccessibility(selector: CSSNode, on_selector: (a11y_selector: string) => void): void; /** * Get the Complexity for a Wallace Selector Node * @param selector - Wallace CSSNode for a Selector * @return The numeric complexity of the Selector */ declare function getComplexity(selector: CSSNode): number; /** * Walk a selector node and trigger a callback every time a Combinator was found */ declare function getCombinators(selector: CSSNode, onMatch: ({ name, loc }: { name: string; loc: Location; }) => void): void; //#endregion export { calculate as a, CollectionCount as c, isPrefixed as i, Location as l, getComplexity as n, calculateForAST as o, isAccessibility as r, compare as s, getCombinators as t, UniqueWithLocations as u };