/** * KERN Structure Planner for Vue * * Adapts React's structure planner for Vue conventions: * - .vue files instead of .tsx * - composables/ instead of hooks/ * - ref() / computed() instead of useState / useMemo * - Barrel exports use .ts (plain TS, not SFC) * * Supports: bulletproof, atomic, kern, flat patterns. */ import type { GeneratedArtifact, IRNode, ResolvedKernConfig } from '@kernlang/core'; export type NodeRole = 'surface' | 'block' | 'element' | 'container' | 'state' | 'logic' | 'theme' | 'meta'; export interface PlannedFile { path: string; artifactType: GeneratedArtifact['type']; nodes: IRNode[]; rootNode: IRNode; dependsOn: string[]; isEntry: boolean; componentName?: string; } export interface StructurePlan { files: PlannedFile[]; barrels: BarrelExport[]; } export interface BarrelExport { path: string; exports: { name: string; from: string; }[]; } export interface ExtractedComposable { composableName: string; path: string; stateDecls: { name: string; initial: string; }[]; logicBlocks: string[]; returnedValues: string[]; importedBy: string[]; } export declare function classifyNode(node: IRNode): NodeRole; export declare function extractComposables(featureName: string, stateNodes: IRNode[], logicNodes: IRNode[], composablesDir: string): ExtractedComposable[]; export declare function generateStateComposableCode(composable: ExtractedComposable): string; export declare function generateLogicComposableCode(composable: ExtractedComposable, stateComposableName?: string): string; export declare function generateTypesCode(featureName: string, stateDecls: { name: string; initial: string; }[]): string; export declare function generateBarrelCode(barrel: BarrelExport): string; export declare function adaptPlanForNuxt(plan: StructurePlan, root: IRNode): StructurePlan; export declare function planVueStructure(root: IRNode, config: ResolvedKernConfig): StructurePlan | null;