/** * Theme Style Analyzer * * Automatically analyzes existing Shopify theme styles and extracts them * for integration with Preliquify components. This prevents style conflicts * and ensures React components blend seamlessly with the existing theme. * * Features: * - Scans assets/*.css for theme styles * - Extracts :root CSS variables * - Extracts @keyframes animations * - Extracts important selectors (.shopify-*, etc.) * - Generates theme-extracted.css with scoped styles */ export interface ExtractedStyles { /** CSS custom properties from :root */ cssVariables: string[]; /** @keyframes definitions */ keyframes: string[]; /** Important theme selectors */ themeSelectors: string[]; /** Font-face declarations */ fontFaces: string[]; /** Media queries with theme settings */ mediaQueries: string[]; /** Raw combined CSS */ rawCSS: string; } export interface ThemeAnalyzerOptions { /** Directory containing theme assets (default: ./assets) */ assetsDir?: string; /** Directory containing Liquid files to scan for embedded CSS */ liquidDirs?: string[]; /** Selectors to always include */ includeSelectors?: string[]; /** Selectors to exclude */ excludeSelectors?: string[]; /** Whether to scope extracted styles */ scopeStyles?: boolean; /** Scope selector (default: [data-preliquify]) */ scopeSelector?: string; /** Enable verbose logging */ verbose?: boolean; } /** * Analyzes theme styles and extracts relevant CSS */ export declare function analyzeTheme(projectRoot: string, options?: ThemeAnalyzerOptions): Promise; /** * Writes extracted theme styles to a file */ export declare function writeExtractedStyles(outputPath: string, styles: ExtractedStyles): Promise; /** * Full theme analysis workflow */ export declare function extractThemeStyles(projectRoot: string, outputPath: string, options?: ThemeAnalyzerOptions): Promise;