export interface Bounds { x: number; y: number; width: number; height: number; } export interface ContextLink { contextName: string; providerComponent?: string; consumerComponents: string[]; propagatedProperties: string[]; mechanism: 'react-context' | 'zustand' | 'redux' | 'prop-drilling'; providerFile?: string; consumerFiles?: string[]; } export interface ComponentInteraction { file: string; nonStandardProps: Record; } export interface ComponentInteractionsResult { deviations: ComponentInteraction[]; standardCount: number; standardFiles: string[]; } export interface StructuralDiagram { filePath: string; diagram: string; styleSheet: Record>; animatedValues: Array<{ name: string; type: string; description: string; }>; summary: string[]; } export interface MeasurementChainItem { componentName: string; hasOnLayout: boolean; sharedValueName?: string; isSharedValueDeclared: boolean; isSharedValueConsumed: boolean; status: 'complete' | 'broken' | 'incomplete' | 'dead-measurement'; } export interface ChildComponent { name: string; conditional?: string; hasOnLayout: boolean; isInteractive: boolean; /** v0.4.1: Layout role (absolute / relative / flex / unknown) */ childRole?: 'absolute' | 'relative' | 'flex' | 'unknown'; /** v0.4.1: zIndex from StyleSheet */ zIndex?: number; /** v0.4.1: Re-render potential score 1-10 based on non-memoized props */ reRenderScore?: number; /** v0.9.0: Physical Ground Truth — source line number from JSX tag */ lineNumber?: number; } export interface CompositionBOM { filePath: string; childComponents: ChildComponent[]; textStrings: Array<{ value: string; source: string; }>; interactiveElements: Array<{ type: string; label?: string; conditional?: string; }>; conditionalBranches: Array<{ condition: string; renders: string[]; }>; /** WI-2: Measurement chain tracking — declared vs. functional */ measurementChain: MeasurementChainItem[]; } export interface MarginInventoryItem { styleKey: string; property: string; value: number; lineNumber: number; source: 'StyleSheet' | 'inline'; sourceFile: string; isDesignToken?: boolean; } export interface MarginInventoryReport { filePath: string; items: MarginInventoryItem[]; total: number; recommendation: string; } export interface BoundaryGap { severity: 'high' | 'medium' | 'low'; category: 'missing-offset' | 'magic-number' | 'missing-onlayout' | 'zero-height-child' | 'missing-safe-area-in-measurement' | 'unmeasured-list-component' | 'margin-stacking' | 'missing-last-item-guard' | 'style-pollution'; description: string; location: string; suggestion: string; /** WI-1: Whether the target component's interface accepts onLayout */ interfaceStatus?: 'has-onlayout' | 'missing-onlayout' | 'unknown'; /** v0.4.1: Layout Influence Index (1-10) — higher = more impactful */ influenceIndex?: number; } export interface BoundaryGapReport { filePath: string; gaps: BoundaryGap[]; summary: string; } export interface BridgeCrossing { severity: 'high' | 'medium'; handler: string; culprit: string; lineContext: string; lineNumber: number; suggestion: string; } export interface BridgeCrossingReport { filePath: string; crossings: BridgeCrossing[]; summary: string; } export interface RenderTrap { severity: 'high' | 'medium'; component: string; propName: string; propType: 'inline-function' | 'inline-object' | 'inline-array'; parentComponent: string; lineContext: string; lineNumber: number; suggestion: string; } export interface RenderTrapReport { filePath: string; traps: RenderTrap[]; summary: string; } export interface SharedValueInfo { name: string; initialValue: number | string; isMutated: boolean; isConsumedByAnimatedStyle: boolean; /** v4.0: consumed via useDerivedValue (indirect consumption) */ isConsumedByDerivedValue: boolean; /** v4.0: consumed via useAnimatedReaction (side-effect consumption) */ isConsumedByAnimatedReaction: boolean; /** v4.0: consumed via useAnimatedProps (props consumption) */ isConsumedByAnimatedProps: boolean; isUsedDirectlyInJSX: boolean; mutationSites: string[]; consumptionSites: string[]; /** v0.4.1: SharedValue passed as JSX prop to child components */ propPropagationSites: string[]; /** v0.4.1: Mutations happening outside worklet context (JS-thread pressure) */ isMutatedOutsideWorklet: boolean; nonWorkletMutationSites: string[]; /** v0.9.0: SharedValue placed into a React Context provider */ contextPropagationSites: ContextPropagationSite[]; /** v0.9.0: SharedValue consumed via useContext in this file */ contextConsumerSites: ContextConsumerSite[]; } /** v0.9.0: A SharedValue placed into a React Context provider */ export interface ContextPropagationSite { contextName: string; providerComponent?: string; propName: string; lineNumber: number; /** If true, the context provider was found in this file */ isLocal: boolean; } /** v0.9.0: A SharedValue consumed via useContext */ export interface ContextConsumerSite { contextName: string; variableName: string; lineNumber: number; /** How the consumed value is used (e.g., '.value' in useAnimatedStyle, direct JSX) */ usagePatterns: string[]; } export interface SharedValueIssue { severity: 'high' | 'medium' | 'low'; sharedValue: string; description: string; location: string; suggestion: string; } export interface SharedValueLineageReport { filePath: string; sharedValues: SharedValueInfo[]; issues: SharedValueIssue[]; summary: string; } export interface RegistryContract { key: string; height: number; width?: number; pageY?: number; } export interface RegistryCandidate { componentName: string; reason: string; confidence: 'high' | 'medium' | 'low'; location: string; suggestion: string; /** v0.4.1: Suggested unique registry key based on file path */ suggestedRegistryKey?: string; } export interface RegistryCandidateReport { filePath: string; candidates: RegistryCandidate[]; summary: string; } export interface ComponentVisionConfig { /** * Component names that handle safe-area insets internally. * If a file contains one of these as a JSX wrapper, missing-offset * warnings are suppressed. */ safeWrappers?: string[]; /** * Height variable names to scan for offset references. * Default: ['collapsedHeight', 'expandedHeight', 'minimizedHeight', 'headerHeight'] */ heightVariableNames?: string[]; /** * State names to scan for in Ground Truth return blocks. * Default: ['minimized', 'expanded', 'superExpanded', 'collapsed'] */ stateNames?: string[]; /** * Props considered "standard" for component interaction scanning. * Props not in this list are flagged as DEVIATIONS. */ standardProps?: string[]; /** * Props explicitly flagged as "non-standard" for component interaction scanning. * These are always flagged as DEVIATIONS regardless of standardProps. */ nonStandardKeys?: string[]; /** * Files/patterns to ignore during scanning (glob patterns). */ ignorePatterns?: string[]; } /** * Load Component Vision config from a .component-vision.json file. * Searches upward from the given directory. * Uses dynamic import() for ESM compatibility. */ export declare function loadConfig(startDir?: string): Promise; export declare const TOOL_INPUT_SCHEMAS: { readonly render_structural_diagram: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the .tsx/.jsx file to analyze"; }; }; readonly required: readonly ["filePath"]; }; readonly find_component_interactions: { readonly type: "object"; readonly properties: { readonly componentName: { readonly type: "string"; readonly description: "Component name to search for (e.g., DynamicHeader)"; }; readonly projectRoot: { readonly type: "string"; readonly description: "Absolute path to the project root to scan"; }; }; readonly required: readonly ["componentName", "projectRoot"]; }; readonly get_composition_bom: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the .tsx/.jsx file to analyze"; }; readonly verboseStyles: { readonly type: "boolean"; readonly description: "v0.4.1: If true, include layout role (position, zIndex, flex) and re-render potential score for each child component."; readonly default: false; }; }; readonly required: readonly ["filePath"]; }; readonly detect_boundary_gaps: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the .tsx/.jsx file or directory to scan"; }; readonly mode: { readonly type: "string"; readonly enum: readonly ["anchors", "all", "rhythm", "margin-inventory", "gap-validator", "vein-propagation"]; readonly description: "v0.4.1: 'anchors' only reports gaps for Layout Anchors. 'all' reports all gaps (default). 'rhythm' runs the Rhythm Audit. v0.5.1: 'margin-inventory' produces a complete inventory of all margin properties. 'gap-validator' checks containers for proper gap orchestration. v0.6.0: 'vein-propagation' runs the AST-driven Vein Propagation Engine for 100% accurate component tree analysis."; readonly default: "all"; }; readonly stylesPath: { readonly type: "string"; readonly description: "v0.5.1: Explicit path to the styles file (for cross-file style resolution). If not provided, auto-resolves from import statements."; }; readonly designTokens: { readonly type: "array"; readonly items: { readonly type: "number"; }; readonly description: "v0.5.1: Array of valid design token values (e.g., [4, 8, 12, 16, 24, 32]). When provided, spacing values not in this list are flagged as deviations."; }; readonly recursive: { readonly type: "boolean"; readonly description: "v0.5.1: If true and filePath is a directory, recursively scan all .tsx/.ts files in the directory (Batch Audit mode)."; readonly default: false; }; }; readonly required: readonly ["filePath"]; }; readonly detect_bridge_crossings: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the .tsx/.jsx file to scan for bridge crossings"; }; }; readonly required: readonly ["filePath"]; }; readonly detect_render_traps: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the .tsx/.jsx file to scan for render traps"; }; }; readonly required: readonly ["filePath"]; }; readonly trace_shared_value_lineage: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the .tsx/.jsx file to trace SharedValue lineage"; }; }; readonly required: readonly ["filePath"]; }; readonly identify_registry_candidates: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Absolute path to the .tsx/.jsx file to scan for registry candidates"; }; readonly context: { readonly type: "string"; readonly enum: readonly ["scroll", "global"]; readonly description: "v0.4.1: 'scroll' focuses on siblings of ScrollView/FlatList. 'global' focuses on app-level anchors (default)."; readonly default: "global"; }; }; readonly required: readonly ["filePath"]; }; }; //# sourceMappingURL=schemas.d.ts.map