/** * Template Content Validator * * Provides content type detection and naming convention validation for templates. * Returns soft warnings (not errors) to guide users toward best practices. */ export type DetectedContentType = "css" | "js" | "html" | "liquid" | "mixed" | "unknown"; export interface TemplateContentValidation { warnings: string[]; detectedContentType: DetectedContentType; hasCssSuffix: boolean; hasJsSuffix: boolean; } export interface HardcodedColorMatch { line: number; found: string; suggestion: string; } /** * Detects hardcoded CSS colors that should use --bs-* design tokens instead. * * Scans CSS line-by-line, skipping comments and url() contents. * Returns matches with line numbers for actionable warnings. */ export declare function detectHardcodedColors(css: string): HardcodedColorMatch[]; /** * Detects the primary content type of template body */ export declare function detectContentType(body: string): DetectedContentType; /** * Validates template content against naming conventions * * @param name - Template name * @param body - Template body content * @param category - Template category (custom_snippet, system_snippet, etc.) * @returns Validation result with warnings */ export declare function validateTemplateContent(name: string, body: string, category?: string): TemplateContentValidation; /** * Checks if content contains unnecessary wrapper tags for the given suffix */ export declare function hasUnnecessaryWrapperTags(body: string, suffix: "_css" | "_js"): boolean; /** * Checks if content has inline style/script tags missing CSP nonce attributes */ export declare function hasMissingCspNonce(body: string): { styleMissing: boolean; scriptMissing: boolean; }; //# sourceMappingURL=templateContentValidator.d.ts.map