aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
137 lines • 5.18 kB
TypeScript
/**
* AuraGlass Self-Healing Glass Components System
* Automatically detects and corrects visual glitches, accessibility issues, and system errors
* Part of Next-Wave Systems (10/10) - Meta-Systems Framework
*/
import React from "react";
interface ComponentHealthCheck {
componentId: string;
componentType: string;
healthScore: number;
issues: ComponentIssue[];
lastChecked: number;
recoveryAttempts: number;
status: "healthy" | "warning" | "critical" | "healing" | "failed";
}
interface ComponentIssue {
id: string;
type: "visual-glitch" | "accessibility" | "performance" | "memory-leak" | "interaction" | "rendering";
severity: "low" | "medium" | "high" | "critical";
description: string;
detectedAt: number;
autoFixable: boolean;
fixAttempts: number;
resolved: boolean;
metadata: Record<string, any>;
}
interface HealingAction {
id: string;
targetComponent: string;
actionType: "style-reset" | "dom-rebuild" | "state-recovery" | "accessibility-fix" | "performance-optimization";
description: string;
implementation: () => Promise<boolean>;
rollback: () => Promise<void>;
successRate: number;
appliedAt?: number;
}
declare class SelfHealingSystem {
private visualDetector;
private a11yDetector;
private perfDetector;
private componentHealth;
private healingStrategies;
private activeHealing;
constructor();
private initializeHealingStrategies;
diagnoseComponent(element: HTMLElement, componentId: string, componentType: string): Promise<ComponentHealthCheck>;
private calculateHealthScore;
private initiateHealing;
private resetComponentStyles;
private restoreComponentStyles;
private rebuildComponentDOM;
private restoreComponentDOM;
private fixAriaAttributes;
private removeAriaAttributes;
private optimizePerformance;
private revertPerformanceChanges;
getComponentHealth(componentId: string): ComponentHealthCheck | undefined;
getAllComponentHealth(): ComponentHealthCheck[];
getActiveHealing(): Array<{
componentId: string;
actions: HealingAction[];
}>;
recordRenderTime(componentId: string, time: number): void;
}
export declare function GlassSelfHealingProvider({ children, onHealingStarted, onHealingCompleted, diagnosticInterval, }: {
children: React.ReactNode;
onHealingStarted?: (componentId: string, issues: ComponentIssue[]) => void;
onHealingCompleted?: (componentId: string, success: boolean) => void;
diagnosticInterval?: number;
}): import("react/jsx-runtime").JSX.Element;
export declare function useSelfHealing(): {
system: SelfHealingSystem | null;
diagnoseComponent: (element: HTMLElement, componentId: string, componentType: string) => Promise<ComponentHealthCheck>;
getComponentHealth: (componentId: string) => ComponentHealthCheck | undefined;
getAllHealth: () => ComponentHealthCheck[];
};
export declare function GlassSelfHealingWrapper({ children, componentId, componentType, monitoringEnabled, healingEnabled, className, }: {
children: React.ReactNode;
componentId: string;
componentType?: string;
monitoringEnabled?: boolean;
healingEnabled?: boolean;
className?: string;
}): import("react/jsx-runtime").JSX.Element;
export declare function GlassSelfHealingDashboard({ className, showOnlyUnhealthy, }: {
className?: string;
showOnlyUnhealthy?: boolean;
}): import("react/jsx-runtime").JSX.Element;
export declare function useComponentSelfHealing(componentId: string, componentType?: string): {
health: ComponentHealthCheck | null;
runHealthCheck: () => Promise<ComponentHealthCheck | null>;
elementRef: React.RefObject<HTMLElement>;
isHealthy: boolean;
isHealing: boolean;
isCritical: boolean;
};
export declare function GlassSelfHealingSystem({ children, className, components, ...props }: {
children?: React.ReactNode;
className?: string;
components?: any[];
} & React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
export declare const selfHealingPresets: {
strict: {
monitoringInterval: number;
healingThreshold: number;
autoHealingEnabled: boolean;
visualMonitoring: boolean;
accessibilityMonitoring: boolean;
performanceMonitoring: boolean;
};
balanced: {
monitoringInterval: number;
healingThreshold: number;
autoHealingEnabled: boolean;
visualMonitoring: boolean;
accessibilityMonitoring: boolean;
performanceMonitoring: boolean;
};
relaxed: {
monitoringInterval: number;
healingThreshold: number;
autoHealingEnabled: boolean;
visualMonitoring: boolean;
accessibilityMonitoring: boolean;
performanceMonitoring: boolean;
};
development: {
monitoringInterval: number;
healingThreshold: number;
autoHealingEnabled: boolean;
visualMonitoring: boolean;
accessibilityMonitoring: boolean;
performanceMonitoring: boolean;
};
};
export {};
//# sourceMappingURL=GlassSelfHealingSystem.d.ts.map