/** * Layout file detection module * * Detects layout files in Next.js projects, including those with * locale-based routing (e.g., app/[locale]/layout.tsx) * * This module fixes Issue #524 by using glob patterns to find layouts * in dynamic route segments. */ import type { CliLogger, LayoutDetectionResult } from '../types.js'; /** * Find the layout file in a project * * This function searches for layout files in the following order: * 1. Exact matches (app/layout.tsx, src/app/layout.tsx) * 2. Dynamic segment matches (app/[locale]/layout.tsx) * 3. Pages router (_app.tsx) */ export declare const findLayoutFile: (projectRoot: string, logger?: CliLogger) => Promise; /** * Determine if a project uses App Router */ export declare const isAppRouter: (projectRoot: string) => Promise; /** * Determine if a project uses Pages Router */ export declare const isPagesRouter: (projectRoot: string) => Promise; /** * Get the components directory path */ export declare const getComponentsDirectory: (projectRoot: string, layout: LayoutDetectionResult) => string; /** * Get the providers directory path */ export declare const getProvidersDirectory: (projectRoot: string, layout: LayoutDetectionResult) => string;