UNPKG

@stylable/core

Version:

CSS for Components

101 lines 4.3 kB
import { Diagnostics } from '../diagnostics'; import type { Imported } from '../features'; import { Root, Rule, AtRule } from 'postcss'; import type { StylableMeta } from '../stylable-meta'; import type * as postcss from 'postcss'; import type { StylableResolver } from '../stylable-resolver'; export declare const parseImportMessages: { ST_IMPORT_STAR: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; INVALID_ST_IMPORT_FORMAT: { (errors: string[]): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; ST_IMPORT_EMPTY_FROM: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; EMPTY_IMPORT_FROM: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; MULTIPLE_FROM_IN_IMPORT: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; DEFAULT_IMPORT_IS_LOWER_CASE: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; ILLEGAL_PROP_IN_IMPORT: { (propName: string): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; FROM_PROP_MISSING_IN_IMPORT: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; INVALID_NAMED_IMPORT_AS: { (name: string): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; INVALID_NESTED_KEYFRAMES: { (name: string): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; INVALID_NESTED_TYPED_IMPORT: { (type: string, name: string): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; }; export declare const ensureImportsMessages: { ATTEMPT_OVERRIDE_SYMBOL: { (kind: "default" | "keyframes" | "named", origin: string, override: string): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; PATCH_CONTAINS_NEW_IMPORT_IN_NEW_IMPORT_NONE_MODE: { (): import("../diagnostics").DiagnosticBase; code: string; severity: import("../diagnostics").DiagnosticSeverity; }; }; export declare function createAtImportProps(importObj: Partial<Pick<Imported, 'named' | 'keyframes' | 'defaultExport' | 'request'>>): { name: string; params: string; }; export declare function ensureModuleImport(ast: Root, importPatches: Array<ImportPatch>, options: { newImport: 'none' | 'st-import' | ':import'; }, diagnostics?: Diagnostics): { diagnostics: Diagnostics; }; export declare function parseModuleImportStatement(node: AtRule | Rule, context: string, diagnostics: Diagnostics): Imported; export declare function parseStImport(atRule: AtRule, context: string, diagnostics: Diagnostics): Imported; export declare function parsePseudoImport(rule: Rule, context: string, diagnostics: Diagnostics): Imported; export declare function parsePseudoImportNamed(value: string, node: postcss.Declaration | postcss.AtRule, diagnostics: Diagnostics): { namedMap: Record<string, string>; typedMap: Record<string, Record<string, string>>; }; type ImportPatch = Partial<Pick<Imported, 'defaultExport' | 'named' | 'keyframes'>> & Pick<Imported, 'request'>; type ImportEvent = { context: string; request: string; resolved: string; depth: number; }; export declare function tryCollectImportsDeep(resolver: StylableResolver, meta: StylableMeta, imports?: Set<string>, onImport?: undefined | ((e: ImportEvent) => void), depth?: number, origin?: string): Set<string>; export {}; //# sourceMappingURL=import.d.ts.map