import { n as isSupportsBrowserhack, t as isMediaBrowserhack } from "./atrules-CXLSfmpu.js"; import { a as calculate, c as CollectionCount, i as isPrefixed, l as Location, n as getComplexity, r as isAccessibility, u as UniqueWithLocations } from "./utils-yIUD7vGy.js"; import { t as KeywordSet } from "./keyword-set-BXSoLQ6m.js"; import { i as isHack } from "./property-utils-MKX6iGvg.js"; import { a as namedColors, c as isValueBrowserhack, i as colorKeywords, l as isValuePrefixed, n as keywords, o as systemColors, r as colorFunctions } from "./values-DI2FP2Ey.js"; //#region src/vendor-prefix.d.ts /** * Kept for backwards compatibility * @deprecated Will be removed in next major version * */ declare function hasVendorPrefix(keyword: string): boolean; //#endregion //#region src/index.d.ts type Specificity = [number, number, number]; type Options = { /** @description Use Locations (`{ 'item': [{ line, column, offset, length }] }`) instead of a regular count per occurrence (`{ 'item': 3 }`) */useLocations?: boolean; }; declare function analyze(css: string, options?: Options & { useLocations?: false | undefined; }): ReturnType>; declare function analyze(css: string, options: Options & { useLocations: true; }): ReturnType>; declare function analyzeInternal(css: string, options: Options, useLocations: T): { stylesheet: { sourceLinesOfCode: number; linesOfCode: number; size: number; complexity: number; comments: { total: number; size: number; }; embeddedContent: { size: { total: number; ratio: number; }; types: { total: number; totalUnique: number; uniquenessRatio: number; unique: { [k: string]: { size: number; count: number; uniqueWithLocations?: Location[]; }; }; }; }; }; atrules: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { fontface: { total: number; totalUnique: number; unique: Record[]; uniquenessRatio: number; } & ({ uniqueWithLocations: UniqueWithLocations | undefined; } | { uniqueWithLocations?: undefined; }); import: CollectionCount; media: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { browserhacks: CollectionCount; features: CollectionCount; }; charset: CollectionCount; supports: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { browserhacks: CollectionCount; }; keyframes: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { prefixed: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; }; container: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { names: CollectionCount; }; layer: CollectionCount; property: CollectionCount; function: CollectionCount; scope: CollectionCount; complexity: { min: number; max: number; mean: number; mode: number; range: number; sum: number; }; nesting: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { items: number[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); }; rules: { total: number; empty: { total: number; ratio: number; }; sizes: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { items: number[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); nesting: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { items: number[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); selectors: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { items: number[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); declarations: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { items: number[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); }; selectors: { total: number; totalUnique: number; uniquenessRatio: number; specificity: { /** @type Specificity */min: number[]; /** @type Specificity */ max: number[]; /** @type Specificity */ sum: number[]; /** @type Specificity */ mean: number[]; /** @type Specificity */ mode: number[]; /** @type Specificity */ items: Specificity[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); complexity: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { items: number[]; }; nesting: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { items: number[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); id: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; pseudoClasses: CollectionCount; pseudoElements: CollectionCount; accessibility: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; attributes: CollectionCount; customElements: CollectionCount; keyframes: CollectionCount; prefixed: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; combinators: CollectionCount; }; declarations: { total: number; totalUnique: number; uniquenessRatio: number; importants: { total: number; ratio: number; inKeyframes: { total: number; ratio: number; }; }; complexity: { min: number; max: number; mean: number; mode: number; range: number; sum: number; }; nesting: { min: number; max: number; mean: number; mode: number; range: number; sum: number; } & { items: number[]; } & { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }); }; properties: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { prefixed: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; custom: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; importants: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; }; shorthands: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; browserhacks: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { ratio: number; }; complexity: { min: number; max: number; mean: number; mode: number; range: number; sum: number; }; }; values: { colors: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { itemsPerContext: { [k: string]: CollectionCount; }; } & { formats: CollectionCount; }; gradients: CollectionCount; fontFamilies: CollectionCount; fontSizes: CollectionCount; lineHeights: CollectionCount; zindexes: CollectionCount; textShadows: CollectionCount; boxShadows: CollectionCount; borderRadiuses: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { itemsPerContext: { [k: string]: CollectionCount; }; }; animations: { durations: CollectionCount; timingFunctions: CollectionCount; }; prefixes: CollectionCount; browserhacks: CollectionCount; units: { total: number; totalUnique: number; unique: Record; uniquenessRatio: number; } & (T extends true ? { uniqueWithLocations: UniqueWithLocations; } : { uniqueWithLocations?: undefined; }) & { itemsPerContext: { [k: string]: CollectionCount; }; }; complexity: { min: number; max: number; mean: number; mode: number; range: number; sum: number; }; keywords: CollectionCount; resets: CollectionCount; displays: CollectionCount; }; __meta__: { parseTime: number; analyzeTime: number; total: number; }; }; /** * Compare specificity A to Specificity B * @deprecated this one is the inverse of the one exported in /selectors/index.ts; wille be removed in next major version * @returns 0 when a==b, 1 when ab */ declare function compareSpecificity(a: Specificity, b: Specificity): number; //#endregion export { KeywordSet, type Location, Options, Specificity, type UniqueWithLocations, analyze, calculate as calculateSpecificity, colorFunctions, colorKeywords, compareSpecificity, keywords as cssKeywords, hasVendorPrefix, isAccessibility as isAccessibilitySelector, isMediaBrowserhack, isHack as isPropertyHack, isPrefixed as isSelectorPrefixed, isSupportsBrowserhack, isValueBrowserhack, isValuePrefixed, namedColors, getComplexity as selectorComplexity, systemColors };