import { ExtCssDocument } from '../selector'; import { ExtCssRuleData } from '../css-rule'; /** * Parses stylesheet of rules into rules data objects (non-recursively): * 1. Iterates through stylesheet string. * 2. Finds first `{` which can be style declaration start or part of selector. * 3. Validates found string part via selector parser; and if: * - it throws error — saves string part to buffer as part of selector, * slice next stylesheet part to `{` [2] and validates again [3]; * - no error — saves found string part as selector and starts to parse styles (recursively). * * @param rawStylesheet Raw stylesheet as string. * @param extCssDoc ExtCssDocument which uses cache while selectors parsing. * @throws An error on unsupported CSS features, e.g. comments or invalid stylesheet syntax. * @returns Array of rules data which contains: * - selector as string; * - ast to query elements by; * - map of styles to apply. */ export declare const parseStylesheet: (rawStylesheet: string, extCssDoc: ExtCssDocument) => ExtCssRuleData[];