import * as postcss from 'postcss'; import type { AtRuleRaws } from 'postcss/lib/at-rule'; import { Configuration, ConfigurationProps } from '../configuration'; import { NodeProps } from '../node'; import { RawWithValue } from '../raw-with-value'; import * as sassInternal from '../sass-internal'; import { Statement, StatementWithChildren } from '.'; import { _AtRule } from './at-rule-internal'; /** * The set of raws supported by {@link UseRule}. * * @category Statement */ export interface UseRuleRaws extends Omit { /** The representation of {@link UseRule.useUrl}. */ url?: RawWithValue; /** * The text of the explicit namespace value, including `as` and any whitespace * before it. * * Only used if {@link namespace.value} matches {@link UseRule.namespace}. */ namespace?: RawWithValue; /** * The whitespace between the URL or namespace and the `with` keyword. * * Unused if the rule doesn't have a `with` clause. */ beforeWith?: string; /** * The whitespace between the `with` keyword and the configuration map. * * Unused unless the rule has a non-empty configuration. */ afterWith?: string; } /** * The initializer properties for {@link UseRule}. * * @category Statement */ export type UseRuleProps = NodeProps & { raws?: UseRuleRaws; useUrl: string; namespace?: string | null; configuration?: Configuration | ConfigurationProps; }; /** * A `@use` rule. Extends [`postcss.AtRule`]. * * [`postcss.AtRule`]: https://postcss.org/api/#atrule * * @category Statement */ export declare class UseRule extends _AtRule> implements Statement { readonly sassType: "use-rule"; parent: StatementWithChildren | undefined; raws: UseRuleRaws; readonly nodes: undefined; /** The URL loaded by the `@use` rule. */ useUrl: string; /** * This rule's namespace, or `null` if the members can be accessed without a * namespace. * * Note that this is the _semantic_ namespace for the rule, so it's set even * if the namespace is inferred from the URL. When constructing a new * `UseRule`, this is set to {@link defaultNamespace} by default unless an * explicit `null` or string value is passed. */ namespace: string | null; /** * The default namespace for {@link useUrl} if no explicit namespace is * specified, or null if there's not a valid default. */ get defaultNamespace(): string | null; get name(): string; set name(value: string); get params(): string; set params(value: string | number | undefined); /** The variables whose defaults are set when loading this module. */ get configuration(): Configuration; set configuration(configuration: Configuration | ConfigurationProps); private _configuration; constructor(defaults: UseRuleProps); /** @hidden */ constructor(_: undefined, inner: sassInternal.UseRule); clone(overrides?: Partial): this; toJSON(): object; /** @hidden */ toJSON(_: string, inputs: Map): object; /** @hidden */ toString(stringifier?: postcss.Stringifier | postcss.Syntax): string; /** @hidden */ get nonStatementChildren(): ReadonlyArray; }