UNPKG

@hadyfayed/filament-react-wrapper

Version:

Enterprise React integration for Laravel/Filament - Smart asset loading, 90%+ React-PHP function mapping, no-plugin Filament integration

182 lines 5.78 kB
import { default as React } from 'react'; interface ComponentVersion { version: string; component: React.ComponentType<Record<string, unknown>>; metadata: ComponentMetadata; deprecated?: boolean; deprecationMessage?: string; migrationPath?: string; breakingChanges?: BreakingChange[]; dependencies?: ComponentDependency[]; } interface ComponentMetadata { name: string; description: string; author: string; createdAt: string; updatedAt: string; changelog: ChangelogEntry[]; tags: string[]; category: string; apiVersion: string; dependencies?: ComponentDependency[]; } interface BreakingChange { type: 'prop' | 'method' | 'event' | 'structure'; description: string; migration: string; affectedProps?: string[]; replacedWith?: string; } interface ComponentDependency { name: string; version: string; optional?: boolean; reason?: string; } interface ChangelogEntry { version: string; date: string; type: 'major' | 'minor' | 'patch'; changes: string[]; author: string; } interface MigrationResult { success: boolean; fromVersion: string; toVersion: string; migratedProps: Record<string, unknown>; warnings: string[]; errors: string[]; manualStepsRequired: boolean; } interface CompatibilityCheck { compatible: boolean; issues: CompatibilityIssue[]; recommendations: string[]; autoMigrationAvailable: boolean; } interface CompatibilityIssue { severity: 'error' | 'warning' | 'info'; type: string; description: string; affectedProps?: string[]; solution?: string; } interface VersionConstraint { min?: string; max?: string; exact?: string; exclude?: string[]; } declare class ComponentVersioningService { private versions; private aliases; private migrations; private defaultVersions; private compatibilityRules; constructor(); /** * Register a new component version */ registerVersion(componentName: string, version: string, component: unknown, metadata?: Partial<ComponentMetadata>): void; /** * Get version string for a component */ getVersion(componentName: string): string | undefined; /** * Get a specific component version object */ getComponentVersion(componentName: string, version?: string): ComponentVersion | null; /** * Get all versions of a component */ getAllVersions(componentName: string): ComponentVersion[]; /** * Get latest version of a component */ getLatestVersion(componentName: string): ComponentVersion | null; /** * Check if component version exists */ hasVersion(componentName: string, version?: string): boolean; /** * Register version alias */ registerAlias(componentName: string, alias: string, version: string): void; /** * Deprecate a component version */ deprecateVersion(componentName: string, version: string, message?: string, migrationPath?: string): void; /** * Add migration function between versions */ addMigration(componentName: string, fromVersion: string, toVersion: string, migrationFn: MigrationFunction): void; /** * Migrate props from one version to another */ migrateProps(componentName: string, fromVersion: string, toVersion: string, props: Record<string, unknown>): Promise<MigrationResult>; /** * Check compatibility between versions */ checkCompatibility(componentName: string, fromVersion: string, toVersion: string): CompatibilityCheck; /** * Get version constraints satisfaction */ satisfiesConstraint(version: string, constraint: VersionConstraint): boolean; /** * Find best matching version for constraint */ findBestVersion(componentName: string, constraint: VersionConstraint): string | null; /** * Add compatibility rule */ addCompatibilityRule(componentName: string, rule: CompatibilityRule): void; /** * Get component changelog */ getChangelog(componentName: string): ChangelogEntry[]; /** * Get version statistics */ getVersionStats(componentName?: string): { componentName?: string; totalVersions: number; latestVersion?: string; deprecatedVersions: number; totalComponents?: number; deprecated?: ComponentVersion[]; componentsWithMultipleVersions?: string[]; hasBreakingChanges?: boolean; dependencies?: ComponentDependency[]; }; private resolveVersion; private compareVersions; private findMigrationPath; private setupDefaultAliases; /** * Set version for a component */ setVersion(componentName: string, version: string): void; /** * Check if component version is compatible */ isCompatible(componentName: string, requiredVersion: string): boolean; } type MigrationFunction = (props: Record<string, unknown>, context: { componentName: string; fromVersion: string; toVersion: string; }) => Promise<{ props: Record<string, unknown>; warnings?: string[]; manualStepsRequired?: boolean; }>; type CompatibilityRule = (fromVersion: ComponentVersion, toVersion: ComponentVersion) => { issues: CompatibilityIssue[]; recommendations: string[]; } | null; export declare const componentVersioningService: ComponentVersioningService; export type { ComponentVersion, ComponentMetadata, BreakingChange, ComponentDependency, ChangelogEntry, MigrationResult, CompatibilityCheck, CompatibilityIssue, VersionConstraint, MigrationFunction, CompatibilityRule }; export default componentVersioningService; //# sourceMappingURL=ComponentVersioningService.d.ts.map