/** * TachUI Registry Singleton * * Provides a single, globally shared modifier registry instance. * This ensures all packages use the same registry regardless of import path. */ import type { ModifierRegistry, ModifierFactory, ModifierLoader, RegistryHealth, RegistryFeatureFlags, ModifierMetadata, PluginInfo } from "./types"; /** * Internal registry implementation */ declare class ModifierRegistryImpl implements ModifierRegistry { private static instanceCount; private static readonly FORBIDDEN_NAMES; private static readonly NAME_PATTERN; private static validateModifierName; private readonly instanceId; private readonly createdAt; private modifiers; private lazyLoaders; private loadingPromises; private featureFlags; private metadata; private metadataHistory; private conflicts; private plugins; constructor(); register(name: string, factory: ModifierFactory): void; registerLazy(name: string, loader: ModifierLoader): void; get(name: string): ModifierFactory | undefined; get(name: string, options?: { async: true; }): Promise | undefined>; private getAsync; private loadModifier; has(name: string): boolean; list(): string[]; clear(): void; reset(): void; validateRegistry(): RegistryHealth; /** * Get diagnostic information about this registry instance */ getDiagnostics(): { instanceId: string; createdAt: number; modifierCount: number; lazyLoaderCount: number; modifiers: string[]; loadedModifiers: string[]; lazyModifiers: string[]; featureFlags: RegistryFeatureFlags; metadataCount: number; }; /** * Set feature flags for the registry * Allows enabling/disabling features for gradual rollout */ setFeatureFlags(flags: Partial): void; /** * Get current feature flags */ getFeatureFlags(): RegistryFeatureFlags; /** * Check if a specific feature is enabled */ isFeatureEnabled(feature: keyof RegistryFeatureFlags): boolean; /** * Register metadata for a modifier (for type generation) */ registerMetadata(modifierMetadata: ModifierMetadata): void; private recordMetadataHistoryEntry; private refreshConflictsFor; /** * Get metadata for a specific modifier */ getMetadata(name: string | symbol): ModifierMetadata | undefined; /** * Get all registered metadata */ getAllMetadata(): ModifierMetadata[]; /** * Get metadata filtered by category */ getModifiersByCategory(category: ModifierMetadata["category"]): ModifierMetadata[]; getMetadataByCategory(category: ModifierMetadata["category"]): ModifierMetadata[]; /** * Get conflicts (multiple modifiers with same name but different plugins) */ getConflicts(): Map; registerPlugin(metadata: PluginInfo): void; getPluginInfo(name: string): PluginInfo | undefined; listPlugins(): PluginInfo[]; } /** * The global modifier registry - this is what all packages should import */ export declare const globalModifierRegistry: ModifierRegistryImpl; /** * Create an isolated registry instance for testing */ export declare function createIsolatedRegistry(): ModifierRegistryImpl; /** * Reset the global registry (test-only) */ export declare function resetGlobalRegistry(): void; export {};