import Aesthetic from './Aesthetic'; import CacheManager from './CacheManager'; import StyleSheetManager from './StyleSheetManager'; import UnifiedSyntax from './UnifiedSyntax'; import { ClassName, SheetMap, StyleName, TransformOptions, ThemeName } from './types'; export default abstract class Adapter { aesthetic: Aesthetic; syntax: UnifiedSyntax; protected cacheManager: CacheManager>; protected sheetManager: StyleSheetManager | null; /** * Apply and inject global styles for the current theme. * This should only happen once! */ applyGlobalStyles(baseOptions?: TransformOptions): this; /** * Create and return a style sheet unique to an adapter. */ createStyleSheet(styleName: StyleName, baseOptions?: TransformOptions): SheetMap; /** * Flush a target component's transformed styles and inject them into the DOM. * If no target defined, will flush all buffered styles. */ flushStyles(styleName?: StyleName): void; /** * Return the standard cache manager. */ getCacheManager(): CacheManager>; /** * Return a native style sheet manager used for injecting CSS. */ getStyleSheetManager(): StyleSheetManager; /** * Return true if the style object is a parsed block and not a native block. */ isParsedBlock(block: NativeBlock | ParsedBlock): block is ParsedBlock; /** * Parse an Aesthetic style sheet into an adapter native style sheet. */ parseStyleSheet(styleSheet: SheetMap, options: Required): SheetMap; /** * Purge and remove all global styles from the DOM. */ purgeStyles(): void; /** * Reset and clear global styles for the defined theme. */ resetGlobalStyles(prevTheme: ThemeName): this; /** * Transform the list of class names or style objects to a single class name. */ transformStyles(styles: (undefined | false | null | ClassName | NativeBlock | ParsedBlock)[], baseOptions?: TransformOptions): ClassName; /** * Transform the compiled style objects into a class name. */ abstract transformToClassName(styles: ParsedBlock[]): ClassName; /** * Return transform options with defaults applied. */ protected prepareTransformOptions(options?: TransformOptions): Required; } //# sourceMappingURL=Adapter.d.ts.map