import type { PatternCatalogSectionRoleConvention } from './pattern-catalog-section-roles.js'; export { extractPatternSectionRoleMatches, extractPatternSectionRolesFromAttributes, PATTERN_SECTION_ROLE_PATTERN, } from './pattern-catalog-section-roles.js'; export type { PatternCatalogSectionRoleConvention, PatternCatalogSectionRoleMatch, } from './pattern-catalog-section-roles.js'; export declare const PATTERN_CATALOG_SCOPE_IDS: readonly ['full', 'section']; export type PatternCatalogScope = (typeof PATTERN_CATALOG_SCOPE_IDS)[number]; export type PatternCatalogEntry = { contentFile?: string; file?: string; scope?: string; sectionRole?: string; slug: string; tags?: readonly string[]; thumbnailUrl?: string; title?: string; }; export type PatternCatalogDiagnosticSeverity = 'error' | 'warning'; export type PatternCatalogDiagnosticCode = 'duplicate-pattern-slug' | 'invalid-pattern-content-file' | 'invalid-pattern-scope' | 'invalid-pattern-section-role' | 'invalid-pattern-section-role-convention' | 'invalid-pattern-section-role-marker' | 'invalid-pattern-slug' | 'invalid-pattern-tag' | 'invalid-pattern-thumbnail-url' | 'mismatched-pattern-section-role' | 'missing-pattern-content-file' | 'missing-pattern-section-role' | 'missing-pattern-section-role-marker' | 'duplicate-pattern-section-role-marker' | 'unknown-pattern-section-role-marker'; export type PatternCatalogDiagnostic = { code: PatternCatalogDiagnosticCode; message: string; patternSlug?: string; severity: PatternCatalogDiagnosticSeverity; }; /** * Options for validating typed pattern catalog entries and, when `projectDir` * is provided, their serialized pattern content. Set `sectionRoleConvention` to * `false` to keep file existence checks but opt out of section-role marker * validation. */ export type PatternCatalogValidationOptions = { projectDir?: string; sectionRoleConvention?: PatternCatalogSectionRoleConvention | false; }; export type PatternCatalogValidationResult = { diagnostics: PatternCatalogDiagnostic[]; errors: PatternCatalogDiagnostic[]; warnings: PatternCatalogDiagnostic[]; }; export declare const PATTERN_TAG_PATTERN: RegExp; /** * Validate pattern thumbnail references with the same URL/path rules used by * catalog diagnostics and `wp-typia add pattern`. * * @param value Candidate thumbnail URL or relative project path. * @returns Whether the value is an http(s) URL or safe relative project path. */ export declare function isValidPatternThumbnailUrl(value: string): boolean; export declare function resolvePatternCatalogContentFile(pattern: Pick): string | undefined; /** * Validate typed pattern catalog metadata declared in `scripts/block-config.ts`. * * The validator checks catalog shape, duplicate slugs, optional section-role * rules, safe content file paths, and missing files when a workspace root is * provided. With a workspace root, it also parses serialized block markup and * compares section role markers against the catalog manifest. * * @param patterns Pattern catalog entries to validate. * @param options Optional project root and section role marker convention. * @returns Structured diagnostics split into errors and warnings. */ export declare function validatePatternCatalog(patterns: readonly PatternCatalogEntry[], options?: PatternCatalogValidationOptions): PatternCatalogValidationResult; /** * Render pattern catalog diagnostics for CLI, sync, and doctor output. * * @param diagnostics Diagnostics returned from {@link validatePatternCatalog}. * @returns Human-readable lines with stable diagnostic codes. */ export declare function formatPatternCatalogDiagnostics(diagnostics: readonly PatternCatalogDiagnostic[]): string;