import * as i0 from '@angular/core'; import { Provider } from '@angular/core'; /** * Deep partial type for configuration */ type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; }; interface InspectorConfig { /** Enable/disable inspector */ enabled: boolean; /** Keyboard shortcut configuration */ shortcut: { key: string; ctrl?: boolean; shift?: boolean; alt?: boolean; meta?: boolean; }; /** Visual styling for overlays */ overlay: { borderColor: string; backgroundColor: string; borderWidth: number; zIndex: number; }; /** Component filtering rules */ filter: { /** Only show components matching these patterns (glob-style) */ include?: string[]; /** Hide components matching these patterns */ exclude?: string[]; /** Hide standalone components */ hideStandalone?: boolean; /** Library filter: map of library name to visibility state */ libraries?: Record; }; /** Performance optimization settings */ performance: { /** Throttle mutation observer callbacks (ms) */ throttleMs: number; /** Debounce scroll/resize handlers (ms) */ debounceMs: number; /** Use IntersectionObserver for lazy rendering */ useLazyRendering: boolean; /** Maximum visible overlays at once */ maxVisibleOverlays: number; }; /** VS Code integration settings */ vscode: { enabled: boolean; /** Backend API URL for opening files */ backendUrl: string; /** Fallback to vscode:// protocol if backend unavailable */ useFallbackProtocol: boolean; /** Editor variant: 'vscode' or 'vscode-insiders' */ editorVariant: 'vscode' | 'vscode-insiders'; }; } declare const DEFAULT_INSPECTOR_CONFIG: InspectorConfig; declare class ComponentInspectorService { private static readonly STORAGE_KEY; private detector; private overlayManager; private vscodeIntegration; private appRef; private injector; private isActive; private config; private initialized; private configPanelRef; constructor(); /** * Initialize the component inspector */ initialize(config?: DeepPartial): Promise; /** * Toggle inspector mode on/off */ toggle(): void; /** * Enable inspector mode */ enable(): void; /** * Disable inspector mode */ disable(): void; /** * Check if inspector is currently active */ isInspectorActive(): boolean; /** * Get current configuration */ getConfig(): InspectorConfig; /** * Update configuration */ updateConfig(config: DeepPartial): void; /** * Cleanup and destroy */ destroy(): void; /** * Toggle config panel visibility */ toggleConfigPanel(): void; /** * Update overlays based on detected components */ private updateOverlays; /** * Handle component click */ private handleComponentClick; /** * Setup keyboard shortcut listener */ private setupKeyboardShortcut; /** * Get human-readable shortcut description */ private getShortcutDescription; /** * Setup config panel keyboard shortcut (Ctrl+Shift+C) */ private setupConfigPanelShortcut; /** * Create config panel component */ private createConfigPanel; /** * Destroy config panel component */ private destroyConfigPanel; /** * Load configuration from localStorage */ private loadConfig; /** * Save configuration to localStorage */ private saveConfig; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface ComponentInfo { element: Element; className: string; selector: string; filePath?: string; relativePath?: string; library?: string; libraryColor?: string; isStandalone?: boolean; line?: number; } interface ComponentManifest { generated: string; components: ComponentManifestEntry[]; } interface ComponentManifestEntry { className: string; selector: string; filePath: string; relativePath: string; library?: string; line: number; } declare class ComponentDetectorService { components: i0.WritableSignal>; private mutationObserver; private manifest; private throttledMutationHandler; private allLibraries; /** * Load component manifest for file path lookups */ loadManifest(manifestUrl: string): Promise; /** * Initialize component detection */ initialize(throttleMs?: number): void; /** * Stop component detection and cleanup */ destroy(): void; /** * Get the loaded component manifest */ getManifest(): ComponentManifest | null; /** * Get color for a library name (public method for config panel) */ getColorForLibrary(libraryName: string): string; /** * Scan DOM tree for component hosts */ private scanForComponents; /** * Create ComponentInfo from element */ private createComponentInfo; /** * Setup mutation observer to detect dynamically added components */ private setupMutationObserver; /** * Handle DOM mutations */ private handleMutations; /** * Scan a single node and its descendants for components */ private scanForComponentsInNode; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class OverlayManagerService { private overlays; private intersectionObserver; private config; private onClickCallback; /** * Initialize overlay manager */ initialize(config: InspectorConfig, onClickCallback: (info: ComponentInfo) => void): void; /** * Create overlay for a component */ createOverlay(componentInfo: ComponentInfo): void; /** * Remove overlay for a component */ removeOverlay(element: Element): void; /** * Remove all overlays */ removeAllOverlays(): void; /** * Update positions of all overlays */ updateAllOverlays(): void; /** * Cleanup and destroy */ destroy(): void; /** * Create overlay DOM elements */ private createOverlayElements; /** * Position overlay on top of component element */ private positionOverlay; /** * Setup event listeners for scroll and resize */ private setupEventListeners; /** * Setup intersection observer for lazy rendering */ private setupIntersectionObserver; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class VscodeIntegrationService { private http; private config; /** * Initialize with configuration */ initialize(config: InspectorConfig): void; /** * Open component file in code editor * Supports VS Code, IntelliJ, Vim, Sublime, and 20+ other editors via auto-detection */ openInVSCode(componentInfo: ComponentInfo): Promise; /** * Open file via backend API */ private openViaBackend; /** * Open file via vscode:// protocol */ private openViaProtocol; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Check if global Angular debugging utilities are available */ declare function isAngularDebugAvailable(): boolean; /** * Get component instance from a DOM element */ declare function getComponentInstance(element: Element): any | null; /** * Check if an element is an Angular component host */ declare function isComponentHost(element: Element): boolean; /** * Extract component metadata from an element */ declare function extractComponentMetadata(element: Element): Omit | null; /** * Check if a selector matches any of the patterns * Supports glob-style wildcards (*) and exact matches */ declare function matchesPattern(selector: string, patterns: string[]): boolean; /** * Check if a component should be visible based on filter configuration */ declare function shouldShowComponent(info: ComponentInfo, filter: { include?: string[]; exclude?: string[]; hideStandalone?: boolean; libraries?: Record; }): boolean; /** * Throttles a function to execute at most once per specified time period */ declare function throttle any>(func: T, wait: number): (...args: Parameters) => void; /** * Debounces a function to execute after specified delay */ declare function debounce any>(func: T, wait: number): (...args: Parameters) => void; /** * Provide the component inspector with automatic initialization */ declare function provideComponentInspector(config?: DeepPartial): Provider[]; export { ComponentDetectorService, ComponentInspectorService, DEFAULT_INSPECTOR_CONFIG, OverlayManagerService, VscodeIntegrationService, debounce, extractComponentMetadata, getComponentInstance, isAngularDebugAvailable, isComponentHost, matchesPattern, provideComponentInspector, shouldShowComponent, throttle }; export type { ComponentInfo, ComponentManifest, ComponentManifestEntry, DeepPartial, InspectorConfig }; //# sourceMappingURL=twygmbh-component-inspector.d.ts.map