UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

21 lines 807 B
import type { AnalyzedComponent, ControlConfig, ServerStory, StoryAnalyzedProp } from './types'; /** * Generate a story from analyzed component metadata */ export declare function generateAutoStory(component: AnalyzedComponent): ServerStory; /** * Infer control configuration from a prop */ export declare function inferControl(prop: StoryAnalyzedProp): ControlConfig; /** * Generate controls for all props */ export declare function generateControls(props: StoryAnalyzedProp[]): ControlConfig[]; /** * Generate story source code from component and state */ export declare function generateStorySource(componentName: string, state: Record<string, any>): string; /** * Generate a complete story file content */ export declare function generateStoryFileContent(component: AnalyzedComponent): string;