/** One stylesheet an `@import` names, with offsets into the text. */ export interface StylesheetTarget { /** The imported URL, without quotes or `url()`. */ specifier: string; specifierStart: number; specifierEnd: number; /** The target's first character: its quote or `url(`. */ start: number; /** * After the target's closing quote or `)`, or after the media query or * other condition that follows the last target of a list, which applies * to that target alone. */ end: number; /** A media query or other condition follows the target. */ placed: boolean; } /** * One `@import` directive, or a Sass `@use` or `@forward`, with offsets into * the stylesheet's text. */ export interface StylesheetImport { /** The `@` of `@import`, `@use` or `@forward`. */ start: number; /** After the directive's `;`, or its last character when it has none. */ end: number; /** After the comments that follow the directive on its last line. */ trailingEnd: number; /** The imported URL, without quotes or `url()`: the first target's. */ specifier: string; specifierStart: number; specifierEnd: number; /** * Every target of a Sass import that lists more than one, such as * `@import 'theme', 'reset';`. In CSS and Less, a comma after the URL * separates media queries instead. */ targets?: [StylesheetTarget, StylesheetTarget, ...StylesheetTarget[]]; /** * Text after the URL, such as `layer(c15t)`, a media query or * `supports()`, which places the import on purpose, or a Sass `as`, * `with()`, `show` or `hide` clause, which code may depend on. */ placed: boolean; /** Something other than a comment follows the directive on its line. */ followed: boolean; /** * Where the directive ends is certain: nothing but comments follows it on * its line, or it ends at a `;`. Without a `;`, text after it on the same * line may belong to it. In plain CSS, `//` after the `;` is not a * comment, so that directive isn't bounded either. */ bounded: boolean; } /** * Finds the `@import` directives in a stylesheet, and the `@use` and * `@forward` rules in Sass, skipping strings and comments. A directive can span lines, take Less options, and name its URL * as a string or with `url()`. * * @param text - The stylesheet's text. * @param extension - The file extension, which picks the syntax: `.css`, * `.scss`, `.sass` or `.less`. * @returns The directives in source order. */ export declare const findStylesheetImports: (text: string, extension: string) => StylesheetImport[];