import type { Range } from "../parser"; /** * Collect class (`.name`) and id (`#name`) selectors, mapping each unique name * to every source {@link Range} it was defined at. A name only counts when it * appears in a prelude that ends with `{`; names in declaration values or * at-rules (ending with `;`/`}`) are discarded, which keeps hex colors and * numbers out. Names in `:global` scope -- `:global(.x)`, a bare `:global .x`, * or a `:global { ... }` block (and their `:local` inverses) -- are excluded, * matching what a CSS module actually exports. Comments, strings and * interpolations are skipped. `offset` is added to every range so callers can * scan a slice of a larger document (eg an embedded `