import { ComponentCompiler } from './compiler/index.js';
import { ComponentRegistry } from './registry/index.js';
import { ComponentResolver } from './registry/index.js';
import { ComponentManager } from './component-manager/index.js';
export * from './types/index.js';
export { ComponentCompiler } from './compiler/index.js';
export { DEFAULT_PRESETS, DEFAULT_PLUGINS, PRODUCTION_CONFIG, DEVELOPMENT_CONFIG, getBabelConfig, validateBabelPresets, getJSXConfig } from './compiler/index.js';
export { ComponentRegistry } from './registry/index.js';
export { ComponentResolver, ComponentSpec, ComponentRegistryService } from './registry/index.js';
export { ComponentManager } from './component-manager/index.js';
export { createErrorBoundary, withErrorBoundary, formatComponentError, createErrorLogger } from './runtime/index.js';
export { buildComponentProps, normalizeCallbacks, normalizeStyles, validateComponentProps, mergeProps, createPropsTransformer, wrapCallbacksWithLogging, extractPropPaths } from './runtime/index.js';
export { ComponentHierarchyRegistrar, registerComponentHierarchy, validateComponentSpec, flattenComponentHierarchy, countComponentsInHierarchy } from './runtime/index.js';
export { ReactRootManager, reactRootManager } from './runtime/index.js';
export { SetupStyles, createDefaultComponentStyles } from './utilities/component-styles.js';
export { StandardLibraryManager, createStandardLibraries } from './utilities/standard-libraries.js';
export { LibraryLoader } from './utilities/library-loader.js';
export { getCoreRuntimeLibraries, isCoreRuntimeLibrary } from './utilities/core-libraries.js';
export { LibraryRegistry } from './utilities/library-registry.js';
export { ComponentErrorAnalyzer } from './utilities/component-error-analyzer.js';
export { ResourceManager, resourceManager } from './utilities/resource-manager.js';
export { CacheManager } from './utilities/cache-manager.js';
export { unwrapLibraryComponent, unwrapLibraryComponents, unwrapAllLibraryComponents, unwrapComponent, unwrapComponents, unwrapAllComponents } from './utilities/component-unwrapper.js';
export { USER_STATE_KEY_PREFIX, resolveUserStateScope, userStateStorageKey, parseStoredUserSettings, mergeUserSettings, applyUserSettingsUpdate } from './utilities/user-state.js';
export const VERSION = '2.69.1';
export const DEFAULT_CONFIGS = {
    compiler: {
        babel: {
            presets: ['react'],
            plugins: []
        },
        minify: false,
        sourceMaps: false,
        cache: true,
        maxCacheSize: 100
    },
    registry: {
        maxComponents: 1000,
        cleanupInterval: 60000,
        useLRU: true,
        enableNamespaces: true
    }
};
export function createReactRuntime(babelInstance, config, runtimeContext, debug = false) {
    const compilerConfig = {
        ...config?.compiler,
        debug: config?.compiler?.debug ?? debug
    };
    const registryConfig = {
        ...config?.registry,
        debug: config?.registry?.debug ?? debug
    };
    const managerConfig = {
        ...config?.manager,
        debug: config?.manager?.debug ?? debug
    };
    const compiler = new ComponentCompiler(compilerConfig);
    compiler.setBabelInstance(babelInstance);
    const registry = new ComponentRegistry(registryConfig);
    const resolver = new ComponentResolver(registry, compiler, runtimeContext);
    const manager = new ComponentManager(compiler, registry, runtimeContext || { React: null, ReactDOM: null }, managerConfig);
    return {
        compiler,
        registry,
        resolver,
        manager,
        version: VERSION,
        debug
    };
}
//# sourceMappingURL=index.js.map