import { HsonQuery } from "../../../types/livetree.types.js"; /** * Parse a *simple* CSS selector string into an `HsonQuery`. * * Supported selector features (intentionally limited): * - Tag selectors: `div`, `span` * - ID selectors: `#main` * - Class selectors: `.item` (multiple classes are space-joined) * - Attribute equality: `[type="button"]` * - Attribute presence (`[disabled]`) is currently ignored. * * Explicit non-goals (by design): * - No combinators (`>`, `+`, `~`, whitespace) * - No pseudo-classes / pseudo-elements * - No namespaces, escaping, or selector lists * * Semantics: * - The first leading tag name (if present) becomes `query.tag` * - `#id` maps to `attrs.id` * - `.class` values accumulate into a single space-delimited `attrs.class` * - `[attr="value"]` sets `attrs[attr] = value` * - Bare `[attr]` does not add a constraint (presence checks are not represented) * * This parser is intended for Hson’s internal querying needs, not as a * general-purpose CSS selector engine. * * @param selector - A simple selector string (e.g. `div#app.item[data-x="1"]`) * @returns A normalized `HsonQuery` object */ export declare function parse_selector(sel: string): HsonQuery; //# sourceMappingURL=parse-selector.d.ts.map