import * as T from '@babel/types'; import StyleImportInjector from './utils/ImportInjector'; export interface ResolvedImport { identifier: string; request: string; type: string; } export interface UserDependency { source: string; imported?: string; type?: StyleType; } export declare type DependencyResolver = (interpolation: ResolvedImport, localStyle: Style, node: T.Expression) => UserDependency | null; export interface ResolvedOptions { configFile?: string | boolean; writeFiles: boolean; allowGlobal: boolean; cssTagName: string | false; styledTagName: string | false; stylesheetTagName: string | false; jsxPragma?: string | boolean; enableCssProp: boolean; enableDynamicInterpolations: 'cssProp' | boolean; noWarnings?: boolean; resolveDependency?: DependencyResolver; generateInterpolations?: boolean; extension: string; getFileName?: (hostFile: string, opts: ResolvedOptions, id?: string) => string; getRequirePath?: (from: string, to: string, identifier: string) => string; experiments: { modularCssExternals?: boolean; }; } export declare type StyleType = 'stylesheet' | 'class' | 'styled'; export interface BaseStyle { start: number; end: number; type: StyleType; hostFilePath?: string; absoluteFilePath: string; requirePath: string; identifier: string; value: string; code?: string; importIdentifier?: string; } export interface StaticStyle extends BaseStyle { type: 'stylesheet' | 'class'; } export interface DynamicStyle extends BaseStyle { type: 'class' | 'styled'; imports: string; interpolations: Array<{ id: string; unit: string; }>; } export declare type Style = StaticStyle | DynamicStyle; export declare type NodeStyleMap = Map; export interface Change { type: 'stylesheet' | 'class' | 'styled' | 'create-element' | 'style-imports' | 'pragma' | 'import-optimization'; start: number; end: number; code?: string; } export interface StyleState { styles: Map; changeset: Change[]; } export interface AstroturfMetadata { styles: Style[]; changeset: Change[]; } export declare type PluginState = Record & { opts: Partial; styleImports: StyleImportInjector; defaultedOptions: ResolvedOptions; file: any; };