import { ReactNode } from 'react'; import { ModuleId, ModuleProviderConfig, ModulePerformanceMetrics } from './types'; import { VDOMPool } from './vdom-pool'; import { ModuleRegistry } from './module-registry'; import { ModuleLoader } from './module-loader'; import { ModuleEventBus } from './event-bus'; import { SecuritySandbox } from './security-sandbox'; /** * Module system context value. */ export interface ModuleSystemContextValue { /** Configuration */ readonly config: ModuleProviderConfig; /** VDOM pool instance */ readonly pool: VDOMPool; /** Module registry instance */ readonly registry: ModuleRegistry; /** Module loader instance */ readonly loader: ModuleLoader; /** Event bus instance */ readonly eventBus: ModuleEventBus; /** Global security sandbox */ readonly security: SecuritySandbox; /** Whether system is initialized */ readonly isInitialized: boolean; /** Report performance metrics */ readonly reportMetrics: (moduleId: ModuleId, metrics: ModulePerformanceMetrics) => void; /** Check performance budget */ readonly checkBudget: (moduleId: ModuleId, metrics: ModulePerformanceMetrics) => void; } /** * Module provider props. */ export interface ModuleProviderProps { /** Child components */ children: ReactNode; /** Provider configuration */ config?: Partial; /** Custom VDOM pool (optional) */ pool?: VDOMPool; /** Custom registry (optional) */ registry?: ModuleRegistry; /** Custom loader (optional) */ loader?: ModuleLoader; /** Custom event bus (optional) */ eventBus?: ModuleEventBus; /** Callback when system is ready */ onReady?: () => void; /** Callback on system error */ onError?: (error: Error) => void; } /** * Module system context. */ export declare const ModuleSystemContext: import('react').Context; /** * Internal module hierarchy context for tracking module nesting. */ export declare const ModuleHierarchyContext: import('react').Context<{ moduleId: ModuleId | null; depth: number; path: ModuleId[]; }>;