import type { ParsedTsFile, ComponentInventoryEntry, ComponentPropEntry } from "../types.js"; /** * Resolve the canonical PascalCase component name for a source file, following * common design-system file conventions, or null when the path is not a * component-file shape. * * `strong` is true when the signal is a PascalCase filename (`Button.tsx`, * `Button/Button.tsx`) — a trustworthy component marker. It is false for names * derived from a directory (`button/index.tsx`, `button/button.tsx`), which are * ambiguous (a `utils/index.ts` would map to `Utils`) and should be corroborated * by another signal (e.g. a matching Storybook title) before use. */ export declare function componentNameFromPath(relPath: string): { name: string; strong: boolean; } | null; /** * Extract props from a component's source file. * Returns an array of ComponentPropEntry, or undefined if extraction fails. * * Extraction strategy: * 1. Walk function declarations and arrow function exports named as PascalCase components. * 2. Find the first parameter's type annotation. * 3. If it's a TSTypeLiteral (inline props), extract directly. * 4. If it's a reference (e.g. ButtonProps), look for a matching interface or type alias in the file. * - If found, extract from it. * - If not found (cross-file), return [{ name: "", typeText: "" }] as a placeholder. * * Limitation (documented): cross-file prop type resolution is deferred to v0.2. */ export declare function extractComponentProps(componentName: string, source: string): ComponentPropEntry[] | undefined; /** * Build the component inventory by scanning ParsedTsFile imports for components * from the given DS module. Optionally accepts a map of source files from the DS * package itself to extract prop/variant information. * * @param module - the DS module specifier, e.g. "@acme/ui" * @param files - parsed application files (used to count usages) * @param componentSources - optional map of component name → source text for prop extraction */ export declare function buildComponentInventory(module: string, files: ParsedTsFile[], componentSources?: Map): ComponentInventoryEntry[];