UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

33 lines 1.21 kB
import type { AnalyzedComponent, AnalyzedSlot, DirectiveUsage, StoryAnalyzedProp } from '../types'; /** * Analyze a component file and extract metadata */ export declare function analyzeComponentFile(filePath: string): Promise<AnalyzedComponent>; /** * Analyze component content and extract metadata */ export declare function analyzeComponent(content: string, name: string, filePath: string): AnalyzedComponent; /** * Extract props from script tags using proper tokenization */ export declare function extractProps(content: string): StoryAnalyzedProp[]; /** * Extract slots from template */ export declare function extractSlots(content: string): AnalyzedSlot[]; /** * Extract component description from comments */ export declare function extractDescription(content: string): string | undefined; /** * Extract component dependencies (other components used) */ export declare function extractDependencies(content: string): string[]; /** * Extract CSS classes from template (for Crosswind integration) */ export declare function extractCssClasses(content: string): string[]; /** * Extract directive usage from template */ export declare function extractDirectives(content: string): DirectiveUsage[];