/** How a member name in a change is matched against the names in a stylesheet. */ export type NameMatch = /** The whole name, so `palette` matches `palette(` and `igx.palette(` but not `color-palette(`. */ 'exact' | /** * Any name ending with it, so `circular-theme` also matches `progress-circular-theme(`. Theme * property changes rely on this to address several theme functions with one owner. */ 'suffix'; /** Whether a member is called as a function or included as a mixin. */ export type MemberKind = 'function' | 'mixin'; /** A member referenced in a stylesheet, through a call, an include, or both. */ export interface SassMemberReference { /** Start of the member name, after any namespace. */ nameStart: number; /** End of the member name. */ nameEnd: number; /** The namespace the member is referenced through, such as `igx` in `igx.palette(`. */ namespace?: string; kind: MemberKind; /** Start of the argument list, after its opening bracket, when the reference passes one. */ bodyStart?: number; /** Index of the bracket closing the argument list. */ bodyEnd?: number; } /** An `@include` statement, from the keyword (or the `+` shorthand) to its end. */ export interface SassInclude extends SassMemberReference { start: number; /** End of the statement, after its `;` in the SCSS syntax. */ end: number; /** Whether the include passes a content block, which a removal would have to take with it. */ hasContentBlock: boolean; } /** A `@use` or `@forward` rule. */ export interface SassModuleRule { keyword: '@use' | '@forward'; start: number; /** End of the rule, after its `;` in the SCSS syntax. */ end: number; url: string; /** Start and end of the URL, inside its quotes. */ urlStart: number; urlEnd: number; /** The namespace members of a used module are referenced through, `*` for none. */ namespace?: string; } /** * One stylesheet read for migrations. Strings, comments and `url()` tokens are masked once, so * that nothing mentioned in one of them is taken for code, and the members the stylesheet * declares itself are tracked by scope, so that a migration leaves them alone. * * Only this stylesheet is read. Telling which member a reference loaded from another one refers * to needs the module rules of `@use` and `@forward` - re-exports, `hide` and `as prefix-*` - so a * member of the app that another stylesheet declares is still taken for the Ignite UI one. */ export declare class SassStylesheet { readonly content: string; readonly indented: boolean; private _code; private _scopes; constructor(content: string, indented: boolean); /** The stylesheet with strings, comments and `url()` tokens masked by whitespace. */ get code(): string; private get scopes(); /** * Returns every reference to `name(...)` that passes arguments. A reference nested in the * arguments of another one reports its own closing bracket rather than the one of the * reference surrounding it. A reference with the same name nested in one is covered by it, * unless `nested` asks for those too. Members the stylesheet declares itself are skipped. */ findCalls(name: string, options: { match: NameMatch; kind?: MemberKind; nested?: boolean; }): SassMemberReference[]; /** Returns every `@include` of the mixin `name`, with or without arguments. */ findIncludes(name: string, match: NameMatch): SassInclude[]; /** Returns every `@use` and `@forward` rule of the stylesheet. */ findModuleRules(): SassModuleRule[]; /** * The member reference whose name ends with `name` at `index`, or null when the name there is * not a reference: part of another name, a variable, or a member the stylesheet declares itself. */ private reference; /** * Where the statement that starts at `start` and continues at `index` ends, and whether a * content block follows it. */ statementEnd(index: number, start: number): { end: number; block: boolean; }; /** The index of the brace closing an interpolation whose contents start at `start`. */ private interpolationEnd; /** * Tells whether the `name` at `index` is part of a member the stylesheet declares itself. A * user's own `app-grid-summary-theme` ends with a theme function name, so without this its * declaration would lose a parameter its body reads. */ private isOwnMember; /** The at-rule before a member name, or indented shorthand when outside an expression. */ private keywordBefore; /** Collects declarations within their brace or indentation scopes. */ private declarationScopes; }