@hadyfayed/filament-react-wrapper
Version:
Enterprise React integration for Laravel/Filament - Smart asset loading, 90%+ React-PHP function mapping, no-plugin Filament integration
44 lines • 1.85 kB
TypeScript
import { default as React } from 'react';
import { IComponentRegistry } from '../interfaces/IComponentRegistry';
import { IStateManager, IStatePersistence } from '../interfaces/IStateManager';
export type { IComponentDefinition, IComponentRegistry } from '../interfaces/IComponentRegistry';
export type { IStateManagerState, IStateManager, IStatePersistence } from '../interfaces/IStateManager';
export interface ReactWrapperAPI {
readonly componentRegistry: IComponentRegistry;
readonly universalReactRenderer: IUniversalRenderer;
readonly globalStateManager: IStateManager;
readonly statePersistenceService: IStatePersistence;
readonly devTools: IDevTools;
readonly codeSplittingService: ICodeSplittingService;
readonly componentVersioningService: IVersioningService;
readonly bootstrap: () => boolean;
}
export interface IUniversalRenderer {
render(options: {
component: string;
props?: Record<string, unknown>;
statePath?: string;
containerId: string;
onDataChange?: (data: unknown) => void;
onError?: (error: Error) => void;
}): void;
unmount(containerId: string): void;
isRendered(containerId: string): boolean;
}
export interface IDevTools {
enable(): void;
disable(): void;
isEnabled(): boolean;
log(message: string, data?: unknown): void;
}
export interface ICodeSplittingService {
loadComponent(name: string): Promise<React.ComponentType<Record<string, unknown>>>;
preloadComponent(name: string): Promise<void>;
isLoaded(name: string): boolean;
}
export interface IVersioningService {
getVersion(componentName: string): string | undefined;
setVersion(componentName: string, version: string): void;
isCompatible(componentName: string, requiredVersion: string): boolean;
}
//# sourceMappingURL=index.d.ts.map